Skip to content

Can't change TextElement.Foreground property in Button if accent class is present (Fluent Theme) #19326

Answered by timunie
NotQuiteLoona asked this question in Q&A
Discussion options

You must be logged in to vote

Here is the relevant part:

<Style Selector="^.accent">
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AccentButtonBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrush}" />
<Setter Property="Foreground" Value="{DynamicResource AccentButtonForeground}" />
</Style>
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource AccentButtonBackgroundPointerOver}" />
<

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@NotQuiteLoona
Comment options

@timunie
Comment options

Answer selected by NotQuiteLoona
@NotQuiteLoona
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants