wpf icon indicating copy to clipboard operation
wpf copied to clipboard

Wrong Resource Usage in Fluent2 Button Styles

Open robert-abeo opened this issue 1 year ago • 0 comments

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.

https://github.com/dotnet/wpf/blob/673c35418e5416e486e6651b69b89712a36fcf5c/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Button.xaml#L58

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:

https://github.com/dotnet/wpf/blob/673c35418e5416e486e6651b69b89712a36fcf5c/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.Dark.xaml#L341

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:

https://github.com/dotnet/wpf/blob/673c35418e5416e486e6651b69b89712a36fcf5c/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.Dark.xaml#L327-L329

Actual behavior

As described above.

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

No response

Other information

No response

robert-abeo avatar Oct 03 '24 13:10 robert-abeo