-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Colors no longer overridden #798
Comments
As a breaking-change, containers started to use Brushes instead colors, (#773) Can you try overriding <!-- With Single color -->
<SolidColorBrush x:Key="PrimaryContainerBrush" Color="{StaticResource PrimaryContainer}" />
<SolidColorBrush x:Key="PrimaryContainerDarkBrush" Color="{StaticResource PrimaryContainerDark}" />
<!-- Or with gradiend brush -->
<LinearGradientBrush x:Key="PrimaryContainerDarkBrush">
<GradientStop Offset="0" Color="{StaticResource PrimaryContainerDark}" />
<GradientStop Offset="1" Color="{StaticResource SecondaryContainerDark}" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="PrimaryContainerBrush">
<GradientStop Offset="0" Color="{StaticResource PrimaryContainer}" />
<GradientStop Offset="1" Color="{StaticResource SecondaryContainer}" />
</LinearGradientBrush> |
Ah, OK. I've updated my colors with the additional brushes and can confirm that's all it was. Thank you! |
I jumped the gun a bit it seems. I forgot that I'd switched the elements in question over to my own styling. Those changes actually didn't change anything and I still get the default gradient brush. Edit: |
Hi,
After updating to the latest version: 2.10.2 My colour overrides no longer work, and the default colors are shown.
My MAUI app is exclusively for Windows, so I can't comment on if the other platforms are affected.
I was able to reproduce the result in a new project as well (See attached picture
).
This is how I'm overriding:
<Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary x:Name="appColors" Source="Resources/Styles/Colors.xaml" /> <ResourceDictionary Source="Resources/Styles/Styles.xaml" /> <material:StyleResource ColorsOverride="{x:Reference appColors}" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources>
Here are my colors:
`
`
The text was updated successfully, but these errors were encountered: