Skip to content

Commit 436d585

Browse files
committed
Merge latest changes from master.
2 parents d788185 + a4086b1 commit 436d585

34 files changed

+540
-138
lines changed

.paket/paket.exe

112 KB
Binary file not shown.

MainDemo.Wpf/App.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
<startup>
44
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
55
</startup>
6+
<appSettings>
7+
<add key="GitHub" value="https://github.com/ButchersBoy/MaterialDesignInXamlToolkit"/>
8+
</appSettings>
69
</configuration>

MainDemo.Wpf/Domain/DocumentationLink.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Configuration;
23
using System.Windows;
34
using System.Windows.Controls;
45
using System.Windows.Input;
@@ -22,14 +23,14 @@ public DocumentationLink(DocumentationLinkType type, string url, string label)
2223
public static DocumentationLink WikiLink(string page, string label)
2324
{
2425
return new DocumentationLink(DocumentationLinkType.Wiki,
25-
"https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/wiki/" + page, label);
26+
$"{ConfigurationManager.AppSettings["GitHub"]}/wiki/" + page, label);
2627
}
2728

2829
public static DocumentationLink StyleLink(string nameChunk)
2930
{
3031
return new DocumentationLink(
3132
DocumentationLinkType.StyleSource,
32-
$"https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/blob/master/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.{nameChunk}.xaml",
33+
$"{ConfigurationManager.AppSettings["GitHub"]}/blob/master/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.{nameChunk}.xaml",
3334
nameChunk);
3435
}
3536

@@ -39,7 +40,7 @@ public static DocumentationLink ApiLink<TClass>(string subNamespace)
3940

4041
return new DocumentationLink(
4142
DocumentationLinkType.ControlSource,
42-
$"https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/blob/master/MaterialDesignThemes.Wpf/{subNamespace}/{typeName}.cs",
43+
$"{ConfigurationManager.AppSettings["GitHub"]}/blob/master/MaterialDesignThemes.Wpf/{subNamespace}/{typeName}.cs",
4344
typeName);
4445
}
4546

@@ -50,7 +51,7 @@ public static DocumentationLink ApiLink<TClass>()
5051

5152
return new DocumentationLink(
5253
DocumentationLinkType.ControlSource,
53-
$"https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/blob/master/MaterialDesignThemes.Wpf/{typeName}.cs",
54+
$"{ConfigurationManager.AppSettings["GitHub"]}/blob/master/MaterialDesignThemes.Wpf/{typeName}.cs",
5455
typeName);
5556
}
5657

@@ -60,14 +61,20 @@ public static DocumentationLink DemoPageLink<TDemoPage>()
6061
}
6162

6263
public static DocumentationLink DemoPageLink<TDemoPage>(string label)
64+
{
65+
return DemoPageLink<TDemoPage>(label, null);
66+
}
67+
68+
public static DocumentationLink DemoPageLink<TDemoPage>(string label, string nameSpace)
6369
{
6470
var ext = typeof(UserControl).IsAssignableFrom(typeof(TDemoPage))
6571
? "xaml"
6672
: "cs";
6773

74+
6875
return new DocumentationLink(
6976
DocumentationLinkType.DemoPageSource,
70-
$"https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/blob/master/MainDemo.Wpf/{typeof(TDemoPage).Name}.{ext}",
77+
$"{ConfigurationManager.AppSettings["GitHub"]}/blob/master/MainDemo.Wpf/{(string.IsNullOrWhiteSpace(nameSpace) ? "" : ("/" + nameSpace + "/" ))}{typeof(TDemoPage).Name}.{ext}",
7178
label ?? typeof(TDemoPage).Name);
7279
}
7380

MainDemo.Wpf/Domain/ListFieldsViewModel.cs renamed to MainDemo.Wpf/Domain/ListsAndGridsViewModel.cs

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
using System.Collections.ObjectModel;
33
using System.ComponentModel;
44
using System.Runtime.CompilerServices;
5-
using System.Windows.Controls;
5+
using MaterialDesignColors.WpfExample.Domain;
66

7-
namespace MaterialDesignColors.WpfExample.Domain
7+
namespace MaterialDesignDemo.Domain
88
{
99
public class ListsAndGridsViewModel : INotifyPropertyChanged
1010
{
@@ -36,7 +36,7 @@ public bool? IsAllItems3Selected
3636
}
3737
}
3838

39-
private void SelectAll(bool select, IEnumerable<SelectableViewModel> models)
39+
private static void SelectAll(bool select, IEnumerable<SelectableViewModel> models)
4040
{
4141
foreach (var model in models)
4242
{
@@ -70,28 +70,16 @@ private static ObservableCollection<SelectableViewModel> CreateData()
7070
};
7171
}
7272

73-
public ObservableCollection<SelectableViewModel> Items1
74-
{
75-
get { return _items1; }
76-
}
73+
public ObservableCollection<SelectableViewModel> Items1 => _items1;
74+
public ObservableCollection<SelectableViewModel> Items2 => _items2;
7775

78-
public ObservableCollection<SelectableViewModel> Items2
79-
{
80-
get { return _items2; }
81-
}
82-
83-
public ObservableCollection<SelectableViewModel> Items3
84-
{
85-
get { return _items3; }
86-
}
76+
public ObservableCollection<SelectableViewModel> Items3 => _items3;
8777

8878
public event PropertyChangedEventHandler PropertyChanged;
8979

9080
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
9181
{
92-
if (PropertyChanged != null)
93-
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
94-
//PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
82+
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
9583
}
9684

9785
public IEnumerable<string> Foods

MainDemo.Wpf/Domain/MainWindowViewModel.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using MaterialDesignDemo;
1+
using System.Configuration;
2+
using MaterialDesignDemo;
23
using MaterialDesignDemo.Domain;
34
using MaterialDesignThemes.Wpf;
45
using MaterialDesignThemes.Wpf.Transitions;
@@ -15,7 +16,7 @@ public MainWindowViewModel()
1516
new DemoItem("Home", new Home(),
1617
new []
1718
{
18-
new DocumentationLink(DocumentationLinkType.Wiki, "https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/wiki", "WIKI"),
19+
new DocumentationLink(DocumentationLinkType.Wiki, $"{ConfigurationManager.AppSettings["GitHub"]}/wiki", "WIKI"),
1920
DocumentationLink.DemoPageLink<Home>()
2021
}
2122
),
@@ -107,7 +108,7 @@ public MainWindowViewModel()
107108
new []
108109
{
109110
DocumentationLink.DemoPageLink<Lists>("Demo View"),
110-
DocumentationLink.DemoPageLink<ListsAndGridsViewModel>("Demo View Model"),
111+
DocumentationLink.DemoPageLink<ListsAndGridsViewModel>("Demo View Model", "Domain"),
111112
DocumentationLink.StyleLink("ListBox"),
112113
DocumentationLink.StyleLink("ListView")
113114
})

MainDemo.Wpf/Expander.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
</Expander>
4949
</StackPanel>
5050
<materialDesign:Card Grid.Row="1" Background="{DynamicResource MaterialDesignBackground}"
51-
Margin="0 24 0 0">
51+
Margin="4 24 0 0">
5252
<StackPanel>
5353
<Expander HorizontalAlignment="Stretch"
54-
Header="Expander Example 2a">
54+
Header="Expander Example 2a">
5555
<StackPanel Orientation="Vertical"
5656
TextBlock.Foreground="{DynamicResource MaterialDesignBody}"
5757
Margin="24,8,24,16">

MainDemo.Wpf/Home.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Configuration;
34
using System.Diagnostics;
45
using System.Linq;
56
using System.Text;
@@ -28,7 +29,7 @@ public Home()
2829

2930
private void GitHubButton_OnClick(object sender, RoutedEventArgs e)
3031
{
31-
Process.Start("https://github.com/ButchersBoy/MaterialDesignInXamlToolkit");
32+
Process.Start(ConfigurationManager.AppSettings["GitHub"]);
3233
}
3334

3435
private void TwitterButton_OnClick(object sender, RoutedEventArgs e)

MainDemo.Wpf/MaterialDesignDemo.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
</Compile>
5454
<Reference Include="PresentationFramework.Aero2" />
5555
<Reference Include="System" />
56+
<Reference Include="System.Configuration" />
5657
<Reference Include="System.Data" />
5758
<Reference Include="System.Xml" />
5859
<Reference Include="Microsoft.CSharp" />
@@ -99,7 +100,7 @@
99100
<Compile Include="Domain\NotifyPropertyChangedExtension.cs" />
100101
<Compile Include="Domain\DemoItem.cs" />
101102
<Compile Include="Domain\DialogsViewModel.cs" />
102-
<Compile Include="Domain\ListFieldsViewModel.cs" />
103+
<Compile Include="Domain\ListsAndGridsViewModel.cs" />
103104
<Compile Include="Domain\Sample4Dialog.xaml.cs">
104105
<DependentUpon>Sample4Dialog.xaml</DependentUpon>
105106
</Compile>

MainDemo.Wpf/TextFields.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
MinWidth="280"
9191
AcceptsReturn="True"
9292
VerticalScrollBarVisibility="Auto"
93+
SpellCheck.IsEnabled="True"
9394
materialDesign:HintAssist.Hint="Multiline text"
9495
Height="80">Multiline. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. The quick brown fox jumps over the lazy dog. War and peace. Keep going. Go on. For how long? Not long. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</TextBox>
9596
<materialDesign:PackIcon Grid.Row="2" Grid.Column="0" Kind="Phone" Foreground="{Binding ElementName=PhoneTextBox, Path=BorderBrush}" />

MainDemo.Wpf/TransitionsDemo/TransitionsDemoHome.xaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
<materialDesign:TransitionerSlide.BackwardWipe>
3939
<materialDesign:CircleWipe />
4040
</materialDesign:TransitionerSlide.BackwardWipe>
41+
<materialDesign:TransitionerSlide.ForwardWipe>
42+
<materialDesign:SlideWipe Direction="Right" />
43+
</materialDesign:TransitionerSlide.ForwardWipe>
4144
<local:Slide3_Intro />
4245
</materialDesign:TransitionerSlide>
4346

0 commit comments

Comments
 (0)