Skip to content

Commit b6be969

Browse files
committed
Merge branch 'master' into release
2 parents 92a0321 + 25f0120 commit b6be969

26 files changed

+313
-116
lines changed

MahMaterialDragablzMashUp/MahAppsDragablzDemo.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,16 @@
5454
<SpecificVersion>False</SpecificVersion>
5555
<HintPath>..\packages\Dragablz.0.0.1.109\lib\net45\Dragablz.dll</HintPath>
5656
</Reference>
57-
<Reference Include="MahApps.Metro, Version=1.1.3.157, Culture=neutral, processorArchitecture=MSIL">
58-
<HintPath>..\packages\MahApps.Metro.1.1.3-ALPHA157\lib\net45\MahApps.Metro.dll</HintPath>
57+
<Reference Include="MahApps.Metro, Version=1.2.0.0, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
58+
<HintPath>..\packages\MahApps.Metro.1.2.0.0\lib\net45\MahApps.Metro.dll</HintPath>
5959
<Private>True</Private>
6060
</Reference>
6161
<Reference Include="System" />
6262
<Reference Include="System.Data" />
63+
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
64+
<HintPath>..\packages\MahApps.Metro.1.2.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
65+
<Private>True</Private>
66+
</Reference>
6367
<Reference Include="System.Xml" />
6468
<Reference Include="Microsoft.CSharp" />
6569
<Reference Include="System.Core" />
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Dragablz" version="0.0.1.109" targetFramework="net45" />
4-
<package id="MahApps.Metro" version="1.1.3-ALPHA157" targetFramework="net45" />
4+
<package id="MahApps.Metro" version="1.2.0.0" targetFramework="net45" />
55
</packages>

MainDemo.Wpf/Domain/DemoItem.cs

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,41 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.ComponentModel;
34
using System.Linq;
5+
using System.Runtime.CompilerServices;
46
using System.Text;
57
using System.Threading.Tasks;
68

79
namespace MaterialDesignColors.WpfExample.Domain
810
{
9-
public class DemoItem
11+
public class DemoItem : INotifyPropertyChanged
1012
{
11-
public string Name { get; set; }
13+
private string _name;
14+
private object _content;
1215

13-
public object Content { get; set; }
16+
public string Name
17+
{
18+
get { return _name; }
19+
set
20+
{
21+
this.MutateVerbose(ref _name, value, RaisePropertyChanged());
22+
}
23+
}
24+
25+
public object Content
26+
{
27+
get { return _content; }
28+
set
29+
{
30+
this.MutateVerbose(ref _content, value, RaisePropertyChanged());
31+
}
32+
}
33+
34+
public event PropertyChangedEventHandler PropertyChanged;
35+
36+
private Action<PropertyChangedEventArgs> RaisePropertyChanged()
37+
{
38+
return args => PropertyChanged?.Invoke(this, args);
39+
}
1440
}
1541
}

MainDemo.Wpf/Domain/SampleDialog.xaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:local="clr-namespace:MaterialDesignColors.WpfExample.Domain"
76
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
87
xmlns:system="clr-namespace:System;assembly=mscorlib"
9-
xmlns:wpfExample="clr-namespace:MaterialDesignColors.WpfExample"
108
xmlns:materialDesignDemo="clr-namespace:MaterialDesignDemo"
119
mc:Ignorable="d"
1210
d:DesignHeight="300" d:DesignWidth="300">
@@ -51,7 +49,5 @@
5149
CANCEL
5250
</Button>
5351
</StackPanel>
54-
55-
5652
</Grid>
5753
</UserControl>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System.Windows;
2+
using System.Windows.Controls;
3+
4+
namespace MaterialDesignDemo.Domain
5+
{
6+
public class SimpleDataTemplateSelector : DataTemplateSelector
7+
{
8+
public DataTemplate FixedTemplate { get; set; }
9+
10+
public override DataTemplate SelectTemplate(object item, DependencyObject container)
11+
{
12+
return FixedTemplate;
13+
}
14+
}
15+
}

MainDemo.Wpf/Domain/TextFieldsViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public int SelectedValueOne
4242

4343
public IList<int> LongListToTestComboVirtualization { get; }
4444

45+
public DemoItem DemoItem => new DemoItem { Name = "Mr. Test"};
46+
4547
public event PropertyChangedEventHandler PropertyChanged;
4648

4749
private Action<PropertyChangedEventArgs> RaisePropertyChanged()

MainDemo.Wpf/MainWindow.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@
3838
<materialDesign:DialogHost Identifier="RootDialog">
3939
<materialDesign:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}">
4040
<materialDesign:DrawerHost.LeftDrawerContent>
41-
<StackPanel Orientation="Vertical">
41+
<DockPanel MinWidth="212">
4242
<ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}"
43+
DockPanel.Dock="Top"
4344
HorizontalAlignment="Right" Margin="16"
4445
IsChecked="{Binding ElementName=MenuToggleButton, Path=IsChecked, Mode=TwoWay}" />
4546
<ListBox x:Name="DemoItemsListBox" Margin="0 16 0 16" SelectedIndex="0"
@@ -168,7 +169,7 @@
168169
</domain:DemoItem.Content>
169170
</domain:DemoItem>
170171
</ListBox>
171-
</StackPanel>
172+
</DockPanel>
172173
</materialDesign:DrawerHost.LeftDrawerContent>
173174
<DockPanel>
174175
<materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2"

MainDemo.Wpf/MaterialDesignDemo.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
<DependentUpon>SampleProgressDialog.xaml</DependentUpon>
102102
</Compile>
103103
<Compile Include="Domain\SelectableViewModel.cs" />
104+
<Compile Include="Domain\SimpleDataTemplateSelector.cs" />
104105
<Compile Include="Domain\TextFieldsViewModel.cs" />
105106
<Compile Include="Domain\TreesViewModel.cs" />
106107
<Compile Include="Expander.xaml.cs">

0 commit comments

Comments
 (0)