I defined a new accent color in App.xaml lke this:
Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
</ResourceDictionary.MergedDictionaries>
<Color x:Key="SystemAccentColor">#FFCB2128</Color>
<Color x:Key="AcmGreen">#FFB8C282</Color>
<Color x:Key="AcmPink">#FFE672A4</Color>
<Color x:Key="AcmPurple">#FF71749E</Color>
<Thickness x:Key="PivotItemMargin">0</Thickness>
</ResourceDictionary>
</Application.Resources>
It works on UWP app:
However, Accent Color stays default blue on WASM Page (Edge Chromium - 81.0.416.77)
The accent color on WASM do not match with UWP version which defined in App.xaml. It should be. How can I fix this?
Nuget Package:
Package Version(s):
Globally modifying theme colors this way will be supported in Uno soon, when this PR is merged.
For now if you want to modify the color scheme with Uno, you will need to do it per control. For instance for ToggleSwitch
you would:
ResourceDictionary
file in your app (typically into a standalone file called ToggleSwitch.xaml
).Application.Resources
in App.xaml
Fill="{ThemeResource SystemControlHighlightAccentBrush}"
)