Skip to content
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

[NRTM](GH-3088) Add colors and styles from ModernUI for official controls #3561

Open
wants to merge 36 commits into
base: develop
Choose a base branch
from

Conversation

Evangelink
Copy link
Contributor

@Evangelink Evangelink commented Jul 23, 2019

Describe the changes you have made to improve this project

Provides colors, brushes and styles for the official controls implemented in ModernUI.

Buttons:
image image

Checkboxes:
image image

Radiobuttons:
image image

Closed Issues

Fix #3088

@Evangelink
Copy link
Contributor Author

@punker76 Could you confirm this is going the direction you were thinking about?

<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- TODO: MUI - Replace or implement this control -->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@punker76 I can either use a metro circle button here or import this ModernButton from MUI, any preference?

<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressBar">
<!-- TODO: MUI - Import controls or find replacement -->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

src/MahApps.Metro/Styles/Controls.DataGrid.xaml Outdated Show resolved Hide resolved
src/MahApps.Metro/Styles/Controls.ListView.xaml Outdated Show resolved Hide resolved
src/MahApps.Metro/Styles/Controls.MenuItem.xaml Outdated Show resolved Hide resolved
src/MahApps.Metro/Styles/Controls.MenuItem.xaml Outdated Show resolved Hide resolved
src/MahApps.Metro/Styles/Controls.Scrollbars.xaml Outdated Show resolved Hide resolved
@Evangelink
Copy link
Contributor Author

This comment is not directly related to this PR but adding even more resources made me wonder if I don't prefer to have the theme after MahApps rather than at the end:
MahApps.Styles.ListBox -> MahApps.Metro.Styles.ListBox
MahApps.Styles.ListBox.Win10 -> MahApps.Win10.Styles.ListBox

and also for font size instead of MahApps.Sizes.Font.XXX having MahApps.Fonts.Size.XXX and then changing MahApps.Font.Default into MahApps.Font.Family.Default.

@punker76 WDYT?

@timunie
Copy link
Collaborator

timunie commented Jul 24, 2019

This comment is not directly related to this PR but adding even more resources made me wonder if I don't prefer to have the theme after MahApps rather than at the end:
MahApps.Styles.ListBox -> MahApps.Metro.Styles.ListBox
MahApps.Styles.ListBox.Win10 -> MahApps.Win10.Styles.ListBox

and also for font size instead of MahApps.Sizes.Font.XXX having MahApps.Fonts.Size.XXX and then changing MahApps.Font.Default into MahApps.Font.Family.Default.

@punker76 WDYT?

Hi Guys,

BTW is it possible to provide a few different ResourceDictionarys where always just one of them will be used in App.xaml merged Dictionary? So one for Metro-Style, one for Win10-Style, one for MUI-Style and so on? I know that this can be manually done, but it would be cool to have it.

Happy coding
Tim

@Evangelink Evangelink changed the title [WIP] (GH-3088) Add colors and styles from ModernUI for official controls [NRTM](GH-3088) Add colors and styles from ModernUI for official controls Jul 29, 2019
@punker76
Copy link
Member

@punker76 Could you confirm this is going the direction you were thinking about?

I think so. My first 2 points after first review

  • It's maybe better to merge these styles inside it's own resource dictionary Controls.MUI.xaml just as @timunie suggested.
  • The context menu style for Metro is broken, because it's overridden now with the MUI style

@Evangelink
Copy link
Contributor Author

@punker76 When creating Controls.MUI.xaml shall I also set the default style for the components?

@timunie
Copy link
Collaborator

timunie commented Jul 29, 2019

@Evangelink /cc @punker76

Here is my suggetion with two examples https://github.com/timunie/MahApps.Metro/tree/DefaultResourceDictionarys
I merged all the Controls inside pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml and setted my default controls in the new ResourceDictionary. That way the user has still access to all the Styles, if someone want to mix them up.

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
                    xmlns:Converters="clr-namespace:MahApps.Metro.Converters">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!--  note: default style for textblock is now in MetroWindow !!!  -->

    <Style BasedOn="{StaticResource MahApps.Styles.Slider.Win10}" TargetType="Slider" />
    <Style BasedOn="{StaticResource MahApps.Styles.ToggleSwitchButton.Win10}" TargetType="Controls:ToggleSwitchButton" />
    <Style BasedOn="{StaticResource MahApps.Styles.ToggleSwitch.Win10}" TargetType="Controls:ToggleSwitch" />
    <Style BasedOn="{StaticResource MahApps.Styles.RangeSlider.Win10}" TargetType="Controls:RangeSlider" />
</ResourceDictionary>

Happy coding
Tim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

[MUI_P1] Add MUI Styles and Brushes for official WPF Controls
3 participants