MahApps.Metro icon indicating copy to clipboard operation
MahApps.Metro copied to clipboard

Make Windows 10 styles the default

Open Nuklon opened this issue 6 years ago • 4 comments

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).

Nuklon avatar Sep 13 '18 11:09 Nuklon

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.

Foxtrek64 avatar Oct 03 '19 03:10 Foxtrek64

I think the simplest solution to make all Win10 styles the default might be:

  1. Rename Controls.xaml to Controls.Legacy.xaml
  2. 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

537mfb avatar Oct 16 '19 14:10 537mfb

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 avatar Oct 16 '19 18:10 timunie

@timunie Nice -thanks

537mfb avatar Oct 16 '19 19:10 537mfb