Skip to content

Commit 10706f1

Browse files
committed
Merge branch 'Davipb-mahapps'
2 parents 53876b5 + ad6653a commit 10706f1

13 files changed

+360
-35
lines changed

MahMaterialDragablzMashUp/App.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
2222
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
2323

24+
<!-- Material Design: MahApps Compatibility -->
25+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Fonts.xaml" />
26+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Flyout.xaml" />
27+
2428
<!-- Dragablz Material Design -->
2529
<ResourceDictionary Source="pack://application:,,,/Dragablz;component/Themes/materialdesign.xaml"/>
2630

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/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>

MaterialDesignThemes.MahApps/MaterialDesignThemes.MahApps.csproj

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>MaterialDesignThemes.MahApps</RootNamespace>
1111
<AssemblyName>MaterialDesignThemes.MahApps</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
1515
<WarningLevel>4</WarningLevel>
16+
<TargetFrameworkProfile />
1617
</PropertyGroup>
1718
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1819
<DebugSymbols>true</DebugSymbols>
@@ -32,8 +33,16 @@
3233
<WarningLevel>4</WarningLevel>
3334
</PropertyGroup>
3435
<ItemGroup>
36+
<Reference Include="MahApps.Metro, Version=1.1.3.177, Culture=neutral, processorArchitecture=MSIL">
37+
<HintPath>..\packages\MahApps.Metro.1.1.3-ALPHA177\lib\net45\MahApps.Metro.dll</HintPath>
38+
<Private>True</Private>
39+
</Reference>
3540
<Reference Include="System" />
3641
<Reference Include="System.Data" />
42+
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
43+
<HintPath>..\packages\MahApps.Metro.1.1.3-ALPHA177\lib\net45\System.Windows.Interactivity.dll</HintPath>
44+
<Private>True</Private>
45+
</Reference>
3746
<Reference Include="System.Xml" />
3847
<Reference Include="Microsoft.CSharp" />
3948
<Reference Include="System.Core" />
@@ -48,7 +57,15 @@
4857
<Reference Include="PresentationFramework" />
4958
</ItemGroup>
5059
<ItemGroup>
51-
<Page Include="Themes\Dialog.xaml">
60+
<Page Include="Themes\MaterialDesignTheme.MahApps.Dialogs.xaml">
61+
<SubType>Designer</SubType>
62+
<Generator>MSBuild:Compile</Generator>
63+
</Page>
64+
<Page Include="Themes\MaterialDesignTheme.MahApps.Flyout.xaml">
65+
<SubType>Designer</SubType>
66+
<Generator>MSBuild:Compile</Generator>
67+
</Page>
68+
<Page Include="Themes\MaterialDesignTheme.MahApps.Fonts.xaml">
5269
<SubType>Designer</SubType>
5370
<Generator>MSBuild:Compile</Generator>
5471
</Page>
@@ -71,12 +88,20 @@
7188
<Generator>ResXFileCodeGenerator</Generator>
7289
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
7390
</EmbeddedResource>
91+
<None Include="packages.config" />
7492
<None Include="Properties\Settings.settings">
7593
<Generator>SettingsSingleFileGenerator</Generator>
7694
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
7795
</None>
7896
<AppDesigner Include="Properties\" />
7997
</ItemGroup>
98+
<ItemGroup>
99+
<ProjectReference Include="..\MaterialDesignThemes.Wpf\MaterialDesignThemes.Wpf.csproj">
100+
<Project>{f079fb0a-a8ed-4216-b6a5-345756751a04}</Project>
101+
<Name>MaterialDesignThemes.Wpf</Name>
102+
</ProjectReference>
103+
</ItemGroup>
104+
<ItemGroup />
80105
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
81106
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
82107
Other similar extension points exist, see Microsoft.Common.targets.

MaterialDesignThemes.MahApps/Properties/Resources.Designer.cs

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MaterialDesignThemes.MahApps/Properties/Settings.Designer.cs

Lines changed: 5 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MaterialDesignThemes.MahApps/Themes/Dialog.xaml

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
3+
4+
<ResourceDictionary.MergedDictionaries>
5+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml" />
6+
</ResourceDictionary.MergedDictionaries>
7+
8+
<Style BasedOn="{StaticResource MaterialDesignFlatButton}"
9+
TargetType="{x:Type Button}" />
10+
11+
<Style x:Key="AccentedDialogSquareButton"
12+
BasedOn="{StaticResource MaterialDesignFlatButton}"
13+
TargetType="{x:Type Button}" />
14+
15+
<Style x:Key="AccentedDialogHighlightedSquareButton"
16+
BasedOn="{StaticResource MaterialDesignFlatButton}"
17+
TargetType="{x:Type Button}"/>
18+
19+
</ResourceDictionary>

0 commit comments

Comments
 (0)