© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
11mo ago
ChildOfDanu
Cant bind styles to elements
Hi
!
! Actually I am very new to WPF and would appreciate some assistance with a problem I have with this
.
So this is the element tree looks like
:
Main Window
-
> contains Navbar
-
> contains Nav Button
<
- used by Base Button
so I am trying to pass a Style object from Nav Button to the Base Button where I use the Static Resources followed by the key set for the style
the Style in the base button is bonded to a property
however
, the issue is that the styles dont work when I pass in the value to the Base button element in the nav button
however
, if I had the button element in the nav button
, and passed the style parameter from the nav bar
, it works
the code
:
https://pastebin.com/AkX1mT3A
Pastebin
WPF #1 - Pastebin.com
Pastebin
.com is the number one paste tool since 2002
. Pastebin is a website where you can store text online for a set period of time
.
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Setting bind data to DataGridViewComboBoxColumn
C
C# / help
2y ago
Blazor Dropdown bind to value
C
C# / help
4y ago
❔ Unable to bind CollectionView to Dictionary
C
C# / help
3y ago