Skip to content

Commit 1a25b2d

Browse files
committed
Merge branch 'master' into release
2 parents 0be8c02 + e44b53f commit 1a25b2d

File tree

71 files changed

+2092
-671
lines changed

Some content is hidden

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

71 files changed

+2092
-671
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contribution Guidelines
22

3-
PRs to this project are welcome, but before contributing please bear in mind my thoughts below. If you want to get involved but are unsure, please ask (say hello in the [Gitter chat room](http://gitter.im/ButchersBoy/MaterialDesignInXamlToolkit)). Also note that I wrote these guidelines several months after the library was first made available, with the benefit of hindsight. Apologies if there are inconsistencies with what you read below and what's already in the library.
3+
PRs to this project are welcome, but before contributing please bear in mind my thoughts below. Whe possible please include unit tests. If you want to get involved but are unsure, please ask (say hello in the [Gitter chat room](http://gitter.im/ButchersBoy/MaterialDesignInXamlToolkit)). Also note that I wrote these guidelines several months after the library was first made available, with the benefit of hindsight. Apologies if there are inconsistencies with what you read below and what's already in the library.
44

55
## The purposes of this library:
66

MainDemo.Wpf/App.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ protected override void OnStartup(StartupEventArgs e)
1919
XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
2020
*/
2121

22+
// test setup for Persian culture settings
23+
/*System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fa-Ir");
24+
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fa-Ir");
25+
FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(
26+
System.Windows.Markup.XmlLanguage.GetLanguage(System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag)));*/
27+
2228
base.OnStartup(e);
2329
}
2430
}

MainDemo.Wpf/Buttons.xaml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<UserControl x:Class="MaterialDesignColors.WpfExample.Buttons"
1+
<UserControl x:Class="MaterialDesignColors.WpfExample.Buttons"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
4+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:system="clr-namespace:System;assembly=mscorlib"
77
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
88
xmlns:materialDesignConverters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf"
@@ -131,7 +131,8 @@
131131
<RowDefinition Height="*"/>
132132
<RowDefinition Height="*"/>
133133
<RowDefinition Height="*"/>
134-
<RowDefinition Height="*" />
134+
<RowDefinition Height="*"/>
135+
<RowDefinition Height="*"/>
135136
</Grid.RowDefinitions>
136137
<TextBlock Grid.Column="0" Grid.Row="0" Style="{StaticResource MaterialDesignTitleTextBlock}" Margin="8,8,8,16">OPTIONS</TextBlock>
137138
<TextBox Grid.Column="0" Grid.Row="1" materialDesign:HintAssist.Hint="Setting 1" Text="200"/>
@@ -152,6 +153,17 @@
152153
<ComboBoxItem>250%</ComboBoxItem>
153154
<ComboBoxItem>501%</ComboBoxItem>
154155
</ComboBox>
156+
157+
<StackPanel Grid.Row="5" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
158+
<Button Content="_Save" Command="{x:Static materialDesign:PopupBox.ClosePopupCommand}" />
159+
<Button Content="_Cancel" Command="{x:Static materialDesign:PopupBox.ClosePopupCommand}">
160+
<Button.Style>
161+
<Style TargetType="Button" BasedOn="{StaticResource MaterialDesignPopupBoxButton}">
162+
<Setter Property="Foreground" Value="Red" />
163+
</Style>
164+
</Button.Style>
165+
</Button>
166+
</StackPanel>
155167
</Grid>
156168

157169
</materialDesign:PopupBox>
@@ -270,7 +282,7 @@
270282
<smtx:XamlDisplay Key="buttons_26" Margin="5 0 0 0">
271283
<Grid Width="124">
272284
<!-- raised button with progress, useful to auto dismiss/accept something -->
273-
<Button Command="{Binding DismissComand}"
285+
<Button Command="{Binding DismissCommand}"
274286
Style="{StaticResource MaterialDesignRaisedButton}"
275287
HorizontalAlignment="Left"
276288
materialDesign:ButtonProgressAssist.Value="{Binding DismissButtonProgress}"
@@ -302,7 +314,7 @@
302314
<!-- floating action button with progress -->
303315
<TextBlock Margin="24 0 0 0" VerticalAlignment="Center">Click Me:</TextBlock>
304316
<Button Style="{StaticResource MaterialDesignFloatingActionLightButton}" Margin="8 0 0 0"
305-
Command="{Binding SaveComand}"
317+
Command="{Binding SaveCommand}"
306318
materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding IsSaving}"
307319
materialDesign:ButtonProgressAssist.Value="{Binding SaveProgress}">
308320
<!-- simple example of toggling/animating pack icon with a data trigger-->
@@ -596,6 +608,7 @@
596608
<materialDesign:RatingBar Value="3" x:Name="BasicRatingBar" ValueChanged="BasicRatingBar_ValueChanged"/>
597609
</smtx:XamlDisplay>
598610
<TextBlock Text="{Binding ElementName=BasicRatingBar, Path=Value, StringFormat=Rating: {0}}" VerticalAlignment="Top" Margin="10,2,0,0" />
611+
599612
<smtx:XamlDisplay Key="buttons_59" Margin="24 0 0 5">
600613
<materialDesign:RatingBar x:Name="CustomRatingBar" Max="3" Value="2" Orientation="Vertical">
601614
<materialDesign:RatingBar.ValueItemTemplate>
@@ -611,6 +624,11 @@
611624
</materialDesign:RatingBar>
612625
</smtx:XamlDisplay>
613626
<TextBlock Text="{Binding ElementName=CustomRatingBar, Path=Value, StringFormat=Rating: {0}}" VerticalAlignment="Top" Margin="10,2,0,0" />
627+
628+
<smtx:XamlDisplay Key="buttons_62" VerticalContentAlignment="Top" Margin="5 0 0 5">
629+
<materialDesign:RatingBar Value="4" IsReadOnly="True" x:Name="ReadOnlyRatingBar"/>
630+
</smtx:XamlDisplay>
631+
<TextBlock Text="{Binding ElementName=ReadOnlyRatingBar, Path=Value, StringFormat=Readonly Rating: {0}}" VerticalAlignment="Top" Margin="10,2,0,0" />
614632
</StackPanel>
615633
</Grid>
616634
</UserControl>

MainDemo.Wpf/ButtonsViewModel.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public ButtonsViewModel()
1818
var autoStartingActionCountdownStart = DateTime.Now;
1919
var demoRestartCountdownComplete = DateTime.Now;
2020
var dismissRequested = false;
21-
DismissComand = new AnotherCommandImplementation(_ => dismissRequested = true);
21+
DismissCommand = new AnotherCommandImplementation(_ => dismissRequested = true);
2222
ShowDismissButton = true;
2323

2424
#region DISMISS button demo control
@@ -69,7 +69,7 @@ public ButtonsViewModel()
6969
OrClickMeCount = 0;
7070

7171
//just some demo code for the SAVE button
72-
SaveComand = new AnotherCommandImplementation(_ =>
72+
SaveCommand = new AnotherCommandImplementation(_ =>
7373
{
7474
if (IsSaveComplete == true)
7575
{
@@ -107,7 +107,7 @@ public ButtonsViewModel()
107107

108108
#region Dismiss button demo
109109

110-
public ICommand DismissComand { get; }
110+
public ICommand DismissCommand { get; }
111111

112112
public bool ShowDismissButton
113113
{
@@ -149,7 +149,7 @@ public int OrClickMeCount
149149

150150
#region floating Save button demo
151151

152-
public ICommand SaveComand { get; }
152+
public ICommand SaveCommand { get; }
153153

154154
private bool _isSaving;
155155
public bool IsSaving

MainDemo.Wpf/Domain/MainWindowViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public MainWindowViewModel(ISnackbarMessageQueue snackbarMessageQueue)
6969
new DemoItem("Sliders", new Sliders(), new []
7070
{
7171
DocumentationLink.DemoPageLink<Sliders>(),
72-
DocumentationLink.StyleLink("Sliders")
72+
DocumentationLink.StyleLink("Slider")
7373
}),
7474
new DemoItem("Chips", new Chips(), new []
7575
{

MainDemo.Wpf/Domain/TextFieldsViewModel.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace MaterialDesignColors.WpfExample.Domain
88
public class TextFieldsViewModel : INotifyPropertyChanged
99
{
1010
private string _name;
11+
private string _name2;
1112
private int? _selectedValueOne;
1213
private string _selectedTextTwo;
1314

@@ -28,6 +29,15 @@ public string Name
2829
}
2930
}
3031

32+
public string Name2
33+
{
34+
get { return _name2; }
35+
set
36+
{
37+
this.MutateVerbose(ref _name2, value, RaisePropertyChanged());
38+
}
39+
}
40+
3141
public int? SelectedValueOne
3242
{
3343
get { return _selectedValueOne; }

0 commit comments

Comments
 (0)