Skip to content

Commit a950b88

Browse files
committed
merge into development
2 parents 640a85e + 41d69f9 commit a950b88

File tree

258 files changed

+7485
-1656
lines changed

Some content is hidden

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

258 files changed

+7485
-1656
lines changed

.paket/paket.bootstrapper.exe

25 KB
Binary file not shown.

.paket/paket.exe

3.72 MB
Binary file not shown.

.paket/paket.targets

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<!-- Enable the restore command to run before builds -->
5+
<RestorePackages Condition=" '$(RestorePackages)' == '' ">true</RestorePackages>
6+
<!-- Download Paket.exe if it does not already exist -->
7+
<DownloadPaket Condition=" '$(DownloadPaket)' == '' ">true</DownloadPaket>
8+
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath>
9+
<PaketRootPath>$(MSBuildThisFileDirectory)..\</PaketRootPath>
10+
<MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath>
11+
<MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
12+
</PropertyGroup>
13+
<PropertyGroup>
14+
<!-- Paket command -->
15+
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
16+
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
17+
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
18+
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
19+
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
20+
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 $(PaketBootStrapperExePath)</PaketBootStrapperCommand>
21+
<!-- Commands -->
22+
<PaketReferences Condition="!Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectDirectory)\paket.references</PaketReferences>
23+
<PaketReferences Condition="Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectFullPath).paket.references</PaketReferences>
24+
<RestoreCommand>$(PaketCommand) restore --references-files "$(PaketReferences)"</RestoreCommand>
25+
<DownloadPaketCommand>$(PaketBootStrapperCommand)</DownloadPaketCommand>
26+
<!-- We need to ensure packages are restored prior to assembly resolve -->
27+
<BuildDependsOn Condition="$(RestorePackages) == 'true'">RestorePackages; $(BuildDependsOn);</BuildDependsOn>
28+
</PropertyGroup>
29+
<Target Name="CheckPrerequisites">
30+
<!-- Raise an error if we're unable to locate paket.exe -->
31+
<Error Condition="'$(DownloadPaket)' != 'true' AND !Exists('$(PaketExePath)')" Text="Unable to locate '$(PaketExePath)'" />
32+
<MsBuild Targets="DownloadPaket" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadPaket=$(DownloadPaket)" />
33+
</Target>
34+
<Target Name="DownloadPaket">
35+
<Exec Command="$(DownloadPaketCommand)" IgnoreStandardErrorWarningFormat="true" Condition=" '$(DownloadPaket)' == 'true' AND !Exists('$(PaketExePath)')" />
36+
</Target>
37+
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
38+
<Exec Command="$(RestoreCommand)" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(PaketRootPath)" Condition="Exists('$(PaketReferences)')" />
39+
</Target>
40+
</Project>

Code

1.45 MB
Binary file not shown.

MahMaterialDragablzMashUp/App.xaml

Lines changed: 28 additions & 53 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,40 @@
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" />
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" />
5423

55-
</ResourceDictionary>
24+
<!-- Material Design: MahApps Compatibility -->
25+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Defaults.xaml "/>
5626

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 -->
27+
<!-- Dragablz Material Design -->
7028
<ResourceDictionary Source="pack://application:,,,/Dragablz;component/Themes/materialdesign.xaml"/>
7129

7230
</ResourceDictionary.MergedDictionaries>
7331

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

MahMaterialDragablzMashUp/DialogsViewModel.cs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public class DialogsViewModel
2121

2222
public ICommand ShowLeftFlyoutCommand { get; }
2323

24+
private ResourceDictionary DialogDictionary = new ResourceDictionary() { Source = new Uri("pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Dialogs.xaml") };
25+
2426
public DialogsViewModel()
2527
{
2628
ShowInputDialogCommand = new AnotherCommandImplementation(_ => InputDialog());
@@ -34,12 +36,8 @@ private void InputDialog()
3436
{
3537
var metroDialogSettings = new MetroDialogSettings
3638
{
37-
CustomResourceDictionary =
38-
new ResourceDictionary
39-
{
40-
Source = new Uri("pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.MahApps.Dialogs.xaml")
41-
},
42-
NegativeButtonText = "CANCEL",
39+
CustomResourceDictionary = DialogDictionary,
40+
NegativeButtonText = "CANCEL",
4341
SuppressDefaultResources = true
4442
};
4543

@@ -50,11 +48,7 @@ private void ProgressDialog()
5048
{
5149
var metroDialogSettings = new MetroDialogSettings
5250
{
53-
CustomResourceDictionary =
54-
new ResourceDictionary
55-
{
56-
Source = new Uri("pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.MahApps.Dialogs.xaml")
57-
},
51+
CustomResourceDictionary = DialogDictionary,
5852
NegativeButtonText = "CANCEL",
5953
SuppressDefaultResources = true
6054
};
@@ -64,7 +58,7 @@ private void ProgressDialog()
6458

6559
private void ShowLeftFlyout()
6660
{
67-
((MainWindow) Application.Current.MainWindow).LeftFlyout.IsOpen = true;
61+
((MainWindow)Application.Current.MainWindow).LeftFlyout.IsOpen = true;
6862
}
69-
}
63+
}
7064
}

MahMaterialDragablzMashUp/Mah.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
d:DesignHeight="300" d:DesignWidth="300">
99
<StackPanel>
1010
<TextBlock TextWrapping="Wrap">All controls using MahApps themes, will use Material Design pallete.</TextBlock>
11-
<CheckBox Margin="0 8 0 0">CheckBox</CheckBox>
1211
<ListBox Margin="0 8 0 0">
1312
<ListBoxItem IsSelected="True">MahApps</ListBoxItem>
1413
<ListBoxItem>Dragablz</ListBoxItem>
@@ -17,5 +16,7 @@
1716
<controls:ToggleSwitch IsChecked="True" HorizontalAlignment="Left" />
1817
<Button Width="100" Margin="0 8 0 0" Content="Nice" HorizontalAlignment="Left"
1918
Style="{DynamicResource AccentedSquareButtonStyle}" />
19+
<controls:RangeSlider Margin="0 16 0 0" LowerValue="25" UpperValue="75" />
20+
<controls:RangeSlider Margin="0 16 0 0" LowerValue="25" UpperValue="75" Orientation="Vertical" Height="200" />
2021
</StackPanel>
2122
</UserControl>

MahMaterialDragablzMashUp/MahMaterialDragablzMashUp.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@
180180
<Project>{90b53209-c60c-4655-b28d-a1b3e1044ba3}</Project>
181181
<Name>MaterialDesignColors.Wpf</Name>
182182
</ProjectReference>
183+
<ProjectReference Include="..\MaterialDesignThemes.MahApps\MaterialDesignThemes.MahApps.csproj">
184+
<Project>{81556a2d-d467-43e7-945b-fd987c676cf6}</Project>
185+
<Name>MaterialDesignThemes.MahApps</Name>
186+
</ProjectReference>
183187
<ProjectReference Include="..\MaterialDesignThemes.Wpf\MaterialDesignThemes.Wpf.csproj">
184188
<Project>{f079fb0a-a8ed-4216-b6a5-345756751a04}</Project>
185189
<Name>MaterialDesignThemes.Wpf</Name>

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.Uwp/MainPage.xaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
>
1616

1717
<Page.Resources>
18-
<ResourceDictionary>
18+
<ResourceDictionary>
19+
20+
1921

2022
</ResourceDictionary>
2123
</Page.Resources>
@@ -30,6 +32,7 @@
3032
<Button Margin="8 0 0 0" Width="100" Style="{StaticResource MaterialDesignRaisedDarkButton}">DARK</Button>
3133
<Button Margin="8 0 0 0" Width="100" Style="{StaticResource MaterialDesignRaisedAccentButton}">ACCENT</Button>
3234
</StackPanel>
35+
<ToggleSwitch Style="{StaticResource MaterialDesignToggleSwitch}" />
3336
</StackPanel>
3437
</Grid>
3538
</Page>

0 commit comments

Comments
 (0)