Skip to content

Wrong Resource Usage in Fluent2 Button Styles #9886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
robert-abeo opened this issue Oct 3, 2024 · 1 comment
Closed

Wrong Resource Usage in Fluent2 Button Styles #9886

robert-abeo opened this issue Oct 3, 2024 · 1 comment
Assignees

Comments

@robert-abeo
Copy link

Description

The following line has the wrong resource. It's using a level 2 resource key ControlElevationBorderBrush but should be using the button-specific level 3 one.

<Setter TargetName="ContentBorder" Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />

Looks like the accent button styles are incorrect in a similar way. In fact the resource keys we should be using are commented out. I suspect elevation brush needs to be fixed overall.

Reproduction Steps

See code.

Expected behavior

We should be using the proper resource key:

<!--<SolidColorBrush x:Key="ButtonBorderBrushPointerOver" Color="{StaticResource ControlElevationBorder}" />-->

Which for some reason is commented out. All these resources need to be re-actived and used in the templates. This includes the accent button ones:

<!--<SolidColorBrush x:Key="AccentButtonForegroundDisabled" ResourceKey="TextOnAccentFillColorDisabled" />-->
<!--<SolidColorBrush x:Key="AccentButtonBorderBrush" Color="{DynamicResource AccentControlElevationBorder}" />-->
<!--<SolidColorBrush x:Key="AccentButtonBorderBrushPointerOver" Color="{DynamicResource AccentControlElevationBorder}" />-->

Actual behavior

As described above.

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

No response

Other information

No response

@dipeshmsft
Copy link
Member

With the merge of #10578, the above issue is fixed. Hence closing this now.

@dotnet-policy-service dotnet-policy-service bot removed this from the .NET 10 milestone Mar 18, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: ☑ Done
Development

No branches or pull requests

3 participants