-
Notifications
You must be signed in to change notification settings - Fork 675
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
Update Accent Colour Brushes to System APIs #3909
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Aren't the Accent Shades/Tones exposed as colours rather than brushes? You can animate colours, but not brushes. Is there a reason why the colour transitions are being removed? https://docs.microsoft.com/en-us/windows/uwp/design/style/color#accent-color-palette |
I assume the issue is because we get system brushes but not colors ? @stmoy @YuliKl This is unfortunate. Do we have colors we could use instead ? |
The documentation page mentions Also the XAML example shows the value being assigned as a Color to a SolidColorBrush <Page.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<SolidColorBrush x:Key="ButtonBackground" Color="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="ButtonBackgroundPointerOver" Color="{ThemeResource SystemAccentColorLight1}"/>
<SolidColorBrush x:Key="ButtonBackgroundPressed" Color="{ThemeResource SystemAccentColorDark1}"/>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</Page.Resources>
<Button Content="Button"></Button> |
@mdtauk The resource is a Brush, and when accessed through ColorAnimation's |
Maybe this is something WinUI 3 can fix in the future. |
What does this mean? We use ColorAnimation in a few places; I wonder if there is bug here? I think @teaP had similar difficulties but worked around them somehow? |
You could probably generate colour resources using code to grab the colour from the brush, and generate a colour resource in the Theme ResourceDictionaries. |
Description