Replies: 2 comments 2 replies
-
|
Your <Style Selector="Button.Player Path">
<Setter Property="Fill" Value="DodgerBlue" />
</Style>
<Style Selector="Button.Player:pointerover Path">
<Setter Property="Fill" Value="DodgerBlue" />
</Style>
<Style Selector="Button.Player:pressed Path">
<Setter Property="Fill" Value="DodgerBlue" />
</Style>
<Style Selector="Button.Player:disabled Path">
<Setter Property="Fill" Value="Transparent" />
</Style>Note the first style which applies the defaults. You can't target the Also, it's a bad idea to add controls to |
Beta Was this translation helpful? Give feedback.
-
|
Btw, nightly builds show local values set in the same Styles group. It's less confusing there. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use a Style Selector to change the fill clolor of a path when the containing Button is disabled.
I also tried it using a PathIcon with the same result.
This is a simplified version of my code:
The Button works as expected but the Path doesn't change color.
According to the debugger the selector is being applied to the Path but not activated.
Maybe I am missing something obvious, but am starting to wonder if this has something todo with the fact that Fill is an ImmutableSolidColorBrush. I would have thought that that meant the brush couldn't be changed once created, not that it couldn't be replaced.
Any suggestions would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions