Skip to content

Commit fca1e92

Browse files
committed
Merge branch 'Davipb-recommended-colors'
2 parents d01f32d + 2343ec8 commit fca1e92

File tree

158 files changed

+2540
-335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+2540
-335
lines changed

MahMaterialDragablzMashUp/App.xaml

Lines changed: 26 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
StartupUri="MainWindow.xaml">
77
<Application.Resources>
88
<ResourceDictionary>
9+
910
<ResourceDictionary.MergedDictionaries>
1011

1112
<!-- MahApps -->
@@ -14,66 +15,37 @@
1415
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
1516
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
1617

17-
<!-- Material -->
18-
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
19-
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
20-
21-
<!-- primary color -->
22-
<ResourceDictionary>
23-
<!-- include your primary palette -->
24-
<ResourceDictionary.MergedDictionaries>
25-
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/MaterialDesignColor.DeepPurple.xaml" />
26-
</ResourceDictionary.MergedDictionaries>
27-
<!--
28-
include three hues from the primary palette (and the associated forecolours).
29-
Do not rename, keep in sequence; light to dark.
30-
-->
31-
<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="{StaticResource Primary100}"/>
32-
<SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="{StaticResource Primary100Foreground}"/>
33-
<SolidColorBrush x:Key="PrimaryHueMidBrush" Color="{StaticResource Primary500}"/>
34-
<SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="{StaticResource Primary500Foreground}"/>
35-
<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="{StaticResource Primary700}"/>
36-
<SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="{StaticResource Primary700Foreground}"/>
37-
38-
<!-- MAHAPPS BRUSHES -->
39-
<SolidColorBrush x:Key="HighlightBrush" Color="{StaticResource Primary700}" options:Freeze="True" />
40-
<SolidColorBrush x:Key="AccentColorBrush" Color="{StaticResource Primary500}" options:Freeze="True" />
41-
<SolidColorBrush x:Key="AccentColorBrush2" Color="{StaticResource Primary400}" options:Freeze="True" />
42-
<SolidColorBrush x:Key="AccentColorBrush3" Color="{StaticResource Primary300}" options:Freeze="True" />
43-
<SolidColorBrush x:Key="AccentColorBrush4" Color="{StaticResource Primary200}" options:Freeze="True" />
44-
<SolidColorBrush x:Key="WindowTitleColorBrush" Color="{StaticResource Primary700}" options:Freeze="True" />
45-
<SolidColorBrush x:Key="AccentSelectedColorBrush" Color="{StaticResource Primary500Foreground}" options:Freeze="True" />
46-
<LinearGradientBrush x:Key="ProgressBrush" EndPoint="0.001,0.5" StartPoint="1.002,0.5" options:Freeze="True">
47-
<GradientStop Color="{StaticResource Primary700}" Offset="0" />
48-
<GradientStop Color="{StaticResource Primary300}" Offset="1" />
49-
</LinearGradientBrush>
50-
<SolidColorBrush x:Key="CheckmarkFill" Color="{StaticResource Primary500}" options:Freeze="True" />
51-
<SolidColorBrush x:Key="RightArrowFill" Color="{StaticResource Primary500}" options:Freeze="True" />
52-
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{StaticResource Primary500Foreground}" options:Freeze="True" />
53-
<SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{StaticResource Primary500}" Opacity="0.4" options:Freeze="True" />
54-
55-
</ResourceDictionary>
18+
<!-- Material Design -->
19+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
20+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
21+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
22+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
5623

57-
<!-- secondary colour -->
58-
<ResourceDictionary>
59-
<!-- include your secondary pallette -->
60-
<ResourceDictionary.MergedDictionaries>
61-
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/MaterialDesignColor.Lime.xaml" />
62-
</ResourceDictionary.MergedDictionaries>
63-
64-
<!-- include a single secondary accent color (and the associated forecolour) -->
65-
<SolidColorBrush x:Key="SecondaryAccentBrush" Color="{StaticResource Accent200}"/>
66-
<SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="{StaticResource Accent200Foreground}"/>
67-
</ResourceDictionary>
68-
69-
<!-- Include the Dragablz Material Design style -->
24+
<!-- Dragablz Material Design -->
7025
<ResourceDictionary Source="pack://application:,,,/Dragablz;component/Themes/materialdesign.xaml"/>
7126

7227
</ResourceDictionary.MergedDictionaries>
7328

74-
<!-- tell Dragablz tab control to use the Material Design theme -->
29+
<!-- MahApps Brushes -->
30+
<SolidColorBrush x:Key="HighlightBrush" Color="{DynamicResource Primary700}"/>
31+
<SolidColorBrush x:Key="AccentColorBrush" Color="{DynamicResource Primary500}"/>
32+
<SolidColorBrush x:Key="AccentColorBrush2" Color="{DynamicResource Primary400}"/>
33+
<SolidColorBrush x:Key="AccentColorBrush3" Color="{DynamicResource Primary300}"/>
34+
<SolidColorBrush x:Key="AccentColorBrush4" Color="{DynamicResource Primary200}"/>
35+
<SolidColorBrush x:Key="WindowTitleColorBrush" Color="{DynamicResource Primary700}"/>
36+
<SolidColorBrush x:Key="AccentSelectedColorBrush" Color="{DynamicResource Primary500Foreground}"/>
37+
<LinearGradientBrush x:Key="ProgressBrush" EndPoint="0.001,0.5" StartPoint="1.002,0.5">
38+
<GradientStop Color="{DynamicResource Primary700}" Offset="0"/>
39+
<GradientStop Color="{DynamicResource Primary300}" Offset="1"/>
40+
</LinearGradientBrush>
41+
<SolidColorBrush x:Key="CheckmarkFill" Color="{DynamicResource Primary500}"/>
42+
<SolidColorBrush x:Key="RightArrowFill" Color="{DynamicResource Primary500}"/>
43+
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{DynamicResource Primary500Foreground}"/>
44+
<SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{DynamicResource Primary500}" Opacity="0.4"/>
45+
46+
<!-- Dragablz Material Design -->
7547
<Style TargetType="{x:Type dragablz:TabablzControl}" BasedOn="{StaticResource MaterialDesignTabablzControlStyle}" />
76-
48+
7749
</ResourceDictionary>
7850
</Application.Resources>
7951
</Application>

MahMaterialDragablzMashUp/PaletteSelectorViewModel.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
using System;
1+
using MaterialDesignColors;
2+
using MaterialDesignThemes.Wpf;
23
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
using System.Windows;
74
using System.Windows.Input;
8-
using MahApps.Metro;
9-
using MaterialDesignColors;
10-
using MaterialDesignThemes.Wpf;
115

126
namespace MahMaterialDragablzMashUp
137
{
@@ -31,7 +25,7 @@ private static void ApplyBase(bool isDark)
3125

3226
private static void ApplyPrimary(Swatch swatch)
3327
{
34-
new PaletteHelper().ReplacePrimaryColor(swatch);
28+
new PaletteHelper().ReplacePrimaryColor(swatch, true);
3529
}
3630

3731
public ICommand ApplyAccentCommand { get; } = new AnotherCommandImplementation(o => ApplyAccent((Swatch)o));

MainDemo.Wpf/App.xaml

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,12 @@
66
<ResourceDictionary>
77
<ResourceDictionary.MergedDictionaries>
88

9-
<!-- light or dark theme -->
10-
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
11-
<!-- standard templates -->
12-
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
13-
14-
<!-- primary color -->
15-
<ResourceDictionary>
16-
<!-- include your primary palette -->
17-
<ResourceDictionary.MergedDictionaries>
18-
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/MaterialDesignColor.DeepPurple.xaml" />
19-
</ResourceDictionary.MergedDictionaries>
20-
<!--
21-
include three hues from the primary palette (and the associated forecolours).
22-
Do not rename, keep in sequence; light to dark.
23-
-->
24-
<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="{StaticResource Primary200}"/>
25-
<SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="{StaticResource Primary200Foreground}"/>
26-
<SolidColorBrush x:Key="PrimaryHueMidBrush" Color="{StaticResource Primary500}"/>
27-
<SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="{StaticResource Primary500Foreground}"/>
28-
<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="{StaticResource Primary700}"/>
29-
<SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="{StaticResource Primary700Foreground}"/>
30-
</ResourceDictionary>
31-
32-
<!-- secondary colour -->
33-
<ResourceDictionary>
34-
<!-- include your secondary pallette -->
35-
<ResourceDictionary.MergedDictionaries>
36-
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/MaterialDesignColor.Lime.xaml" />
37-
</ResourceDictionary.MergedDictionaries>
9+
<!-- Material -->
10+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
11+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
12+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
13+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
3814

39-
<!-- include a single secondary accent color (and the associated forecolour) -->
40-
<SolidColorBrush x:Key="SecondaryAccentBrush" Color="{StaticResource Accent700}"/>
41-
<SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="{StaticResource Accent700Foreground}"/>
42-
</ResourceDictionary>
4315
</ResourceDictionary.MergedDictionaries>
4416
</ResourceDictionary>
4517
</Application.Resources>

0 commit comments

Comments
 (0)