MahApps.Metro
MahApps.Metro copied to clipboard
Make Windows 10 styles the default
Currently, some of the components are shipped with an optional Windows 10 style (toggleswitch/slider). Given that the majority now runs Windows 10, I think it would make sense to use these as default (and perhaps the older styles as a 'legacy' style).
Should we make a project to track this? There are a lot of loose issues that cover Win10-related theming or style changes and it may be helpful to have some sort of organization.
I think the simplest solution to make all Win10 styles the default might be:
- Rename
Controls.xaml
toControls.Legacy.xaml
- Create new
Controls.xaml
with the following content:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.Legacy.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type Metro:ToggleSwitch}" BasedOn="{StaticResource MahApps.Styles.ToggleSwitch.Win10}" />
<Style TargetType="{x:Type Metro:ToggleSwitchButton}" BasedOn="{StaticResource MahApps.Styles.ToggleSwitchButton.Win10}" />
<!-- repeat above with all other Win10 styles in existence -->
The result would be - anyone using the Controls.xaml
dictionary (which i think is anyone using MahApps) would automatically have their UI modernized to Win10 Styles if/when they update to the new version, and anyone wanting to stay with the old styles could either old off updating or just change Controls.xaml
to Controls.Legacy.xaml
If i have the time i might be able to try my hand at making a PR of this over the weekend if this is an option that can be accepted as the fix for this
Hi @537mfb ,
please have also a look at this discussion. Something similar was already in discussion. https://github.com/MahApps/MahApps.Metro/pull/3561#issuecomment-516075954
Happy coding Tim
@timunie Nice -thanks