Skip to content

Commit 74424ce

Browse files
committed
Merge branch 'master' into transition-api
2 parents 52b37d8 + 6cebaab commit 74424ce

34 files changed

+227
-193
lines changed

MainDemo.Wpf/Buttons.xaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,20 @@
153153
<RadioButton Style="{StaticResource MaterialDesignRadioButton}" Margin="0 0 8 8" VerticalAlignment="Center">
154154
Ga Ga
155155
</RadioButton>
156+
<RadioButton Style="{StaticResource MaterialDesignRadioButton}" Margin="0 0 8 8" VerticalAlignment="Center"
157+
IsEnabled="False">
158+
Disabled
159+
</RadioButton>
156160
<CheckBox Style="{StaticResource MaterialDesignCheckBox}" Margin="0 0 8 8" VerticalAlignment="Center">
157161
Check
158162
</CheckBox>
159163
<CheckBox Style="{StaticResource MaterialDesignCheckBox}" Margin="0 0 8 8" VerticalAlignment="Center" IsChecked="True">
160164
Mate
161165
</CheckBox>
166+
<CheckBox Style="{StaticResource MaterialDesignCheckBox}" Margin="0 0 8 8" VerticalAlignment="Center"
167+
IsEnabled="False">
168+
Disabled
169+
</CheckBox>
162170
</StackPanel>
163171
<StackPanel Grid.Row="7" Margin="0 16 0 0" Orientation="Horizontal">
164172
<ToggleButton Style="{StaticResource MaterialDesignSwitchToggleButton}" VerticalAlignment="Center" />

MainDemo.Wpf/Dialogs.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
<!--#region SAMPLE 4-->
146146
<TextBlock TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Top"
147147
Grid.Column="3" Margin="8 0 8 0"
148-
>SAMPLE 4: Dialog managed managed from view model using IsOpen and custom commands (ignoring the provided routed commands).</TextBlock>
148+
>SAMPLE 4: Dialog managed from view model using IsOpen and custom commands (ignoring the provided routed commands).</TextBlock>
149149
<materialDesign:DialogHost Grid.Column="3" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"
150150
IsOpen="{Binding IsSample4DialogOpen}"
151151
DialogContent="{Binding Sample4Content}">

MainDemo.Wpf/Expander.xaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
<Expander.Header>
1717
<TextBlock Text="Expander Example 1" />
1818
</Expander.Header>
19-
<Border Background="{StaticResource MaterialDesignBackground}" CornerRadius="5" Padding="5">
20-
<StackPanel Orientation="Vertical">
19+
<Border Background="{DynamicResource MaterialDesignBody}"
20+
CornerRadius="5" Padding="5">
21+
<StackPanel Orientation="Vertical"
22+
TextBlock.Foreground="{DynamicResource MaterialDesignPaper}">
2123
<TextBlock Text="A short text to proof functionality." />
2224
<TextBlock Margin="0,50,0,0" Text="A short text to proof functionality." />
2325
</StackPanel>

MainDemo.Wpf/Pickers.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
</Grid.ColumnDefinitions>
2121
<TextBlock Grid.ColumnSpan="3">Classic WPF DatePicker control with Material Design theme, and new TimePicker control:</TextBlock>
2222
<StackPanel Grid.Row="1" Grid.Column="0">
23-
<DatePicker Width="100" HorizontalAlignment="Left" Margin="0 16 0 0" materialDesign:TextFieldAssist.Hint="Pick Date" />
23+
<DatePicker Width="100" HorizontalAlignment="Left" Margin="0 16 0 0" materialDesign:TextFieldAssist.Hint="Pick Date" IsEnabled="False" />
2424
<DatePicker x:Name="FutureDatePicker" Width="100" HorizontalAlignment="Left" Margin="0 16 0 0" materialDesign:TextFieldAssist.Hint="Future Date" />
2525
</StackPanel>
2626
<materialDesign:TimePicker Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" Width="100" HorizontalAlignment="Left" Margin="0 16 0 0"
27+
IsEnabled="False"
2728
materialDesign:TextFieldAssist.Hint="Custom hint" />
2829
<materialDesign:TimePicker Grid.Row="1" Grid.Column="2" Is24Hours="True" x:Name="PresetTimePicker" VerticalAlignment="Top" Width="100" HorizontalAlignment="Left" Margin="0 16 0 0" />
2930

MainDemo.Wpf/TextFields.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
118118
Margin="0 8 0 8"/>
119119
<ComboBox Grid.Row="4" Grid.Column="3" materialDesign:TextFieldAssist.Hint="OS" Style="{StaticResource MaterialDesignFloatingHintComboBox}"
120-
Margin="0 8 0 8">
120+
Margin="0 8 0 8">
121121
<ComboBoxItem>Andoid</ComboBoxItem>
122122
<ComboBoxItem>iOS</ComboBoxItem>
123123
<ComboBoxItem>Linux</ComboBoxItem>
@@ -168,8 +168,8 @@
168168
<TextBox Grid.Row="5" Grid.Column="1" materialDesign:TextFieldAssist.Hint="Floating Hint" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Text="Good stuff"
169169
Margin="0 8 0 8"/>
170170
<ComboBox Grid.Row="5" Grid.Column="3" materialDesign:TextFieldAssist.Hint="Search" IsEditable="True" Style="{StaticResource MaterialDesignFloatingHintComboBox}"
171-
Margin="0 8 0 8">
172-
<ComboBoxItem>Apple</ComboBoxItem>
171+
Margin="0 8 0 8">
172+
<ComboBoxItem IsSelected="True">Apple</ComboBoxItem>
173173
<ComboBoxItem>Banana</ComboBoxItem>
174174
<ComboBoxItem>Pear</ComboBoxItem>
175175
<ComboBoxItem>Orange</ComboBoxItem>

MaterialDesignThemes.Wpf/Card.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
4949
}
5050

5151
public static readonly DependencyProperty UniformCornerRadiusProperty = DependencyProperty.Register(
52-
"UniformCornerRadius", typeof (double), typeof (Card), new FrameworkPropertyMetadata(2.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
52+
nameof(UniformCornerRadius), typeof (double), typeof (Card), new FrameworkPropertyMetadata(2.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
5353

5454
public double UniformCornerRadius
5555
{

MaterialDesignThemes.Wpf/Clock.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public Clock()
6666
}
6767

6868
public static readonly DependencyProperty TimeProperty = DependencyProperty.Register(
69-
"Time", typeof (DateTime), typeof (Clock), new FrameworkPropertyMetadata(default(DateTime), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, TimePropertyChangedCallback));
69+
nameof(Time), typeof (DateTime), typeof (Clock), new FrameworkPropertyMetadata(default(DateTime), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, TimePropertyChangedCallback));
7070

7171
private static void TimePropertyChangedCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
7272
{
@@ -109,7 +109,7 @@ public bool IsMiddayHour
109109
}
110110

111111
public static readonly DependencyProperty IsPostMeridiemProperty = DependencyProperty.Register(
112-
"IsPostMeridiem", typeof (bool), typeof (Clock), new PropertyMetadata(default(bool), IsPostMeridiemPropertyChangedCallback));
112+
nameof(IsPostMeridiem), typeof (bool), typeof (Clock), new PropertyMetadata(default(bool), IsPostMeridiemPropertyChangedCallback));
113113

114114
private static void IsPostMeridiemPropertyChangedCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
115115
{
@@ -127,7 +127,7 @@ public bool IsPostMeridiem
127127
}
128128

129129
public static readonly DependencyProperty Is24HoursProperty = DependencyProperty.Register(
130-
"Is24Hours", typeof (bool), typeof (Clock), new PropertyMetadata(default(bool)));
130+
nameof(Is24Hours), typeof (bool), typeof (Clock), new PropertyMetadata(default(bool)));
131131

132132
public bool Is24Hours
133133
{
@@ -137,7 +137,7 @@ public bool Is24Hours
137137

138138

139139
public static readonly DependencyProperty DisplayModeProperty = DependencyProperty.Register(
140-
"DisplayMode", typeof (ClockDisplayMode), typeof (Clock), new FrameworkPropertyMetadata(ClockDisplayMode.Hours, DisplayModePropertyChangedCallback));
140+
nameof(DisplayMode), typeof (ClockDisplayMode), typeof (Clock), new FrameworkPropertyMetadata(ClockDisplayMode.Hours, DisplayModePropertyChangedCallback));
141141

142142
private static void DisplayModePropertyChangedCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
143143
{
@@ -151,7 +151,7 @@ public ClockDisplayMode DisplayMode
151151
}
152152

153153
public static readonly DependencyProperty DisplayAutomationProperty = DependencyProperty.Register(
154-
"DisplayAutomation", typeof (ClockDisplayAutomation), typeof (Clock), new PropertyMetadata(default(ClockDisplayAutomation)));
154+
nameof(DisplayAutomation), typeof (ClockDisplayAutomation), typeof (Clock), new PropertyMetadata(default(ClockDisplayAutomation)));
155155

156156
public ClockDisplayAutomation DisplayAutomation
157157
{
@@ -160,7 +160,7 @@ public ClockDisplayAutomation DisplayAutomation
160160
}
161161

162162
public static readonly DependencyProperty ButtonStyleProperty = DependencyProperty.Register(
163-
"ButtonStyle", typeof (Style), typeof (Clock), new PropertyMetadata(default(Style)));
163+
nameof(ButtonStyle), typeof (Style), typeof (Clock), new PropertyMetadata(default(Style)));
164164

165165
public Style ButtonStyle
166166
{
@@ -169,7 +169,7 @@ public Style ButtonStyle
169169
}
170170

171171
public static readonly DependencyProperty LesserButtonStyleProperty = DependencyProperty.Register(
172-
"LesserButtonStyle", typeof (Style), typeof (Clock), new PropertyMetadata(default(Style)));
172+
nameof(LesserButtonStyle), typeof (Style), typeof (Clock), new PropertyMetadata(default(Style)));
173173

174174
public Style LesserButtonStyle
175175
{
@@ -178,7 +178,7 @@ public Style LesserButtonStyle
178178
}
179179

180180
public static readonly DependencyProperty ButtonRadiusRatioProperty = DependencyProperty.Register(
181-
"ButtonRadiusRatio", typeof (double), typeof (Clock), new PropertyMetadata(default(double)));
181+
nameof(ButtonRadiusRatio), typeof (double), typeof (Clock), new PropertyMetadata(default(double)));
182182

183183
public double ButtonRadiusRatio
184184
{
@@ -187,7 +187,7 @@ public double ButtonRadiusRatio
187187
}
188188

189189
public static readonly DependencyProperty ButtonRadiusInnerRatioProperty = DependencyProperty.Register(
190-
"ButtonRadiusInnerRatio", typeof (double), typeof (Clock), new PropertyMetadata(default(double)));
190+
nameof(ButtonRadiusInnerRatio), typeof (double), typeof (Clock), new PropertyMetadata(default(double)));
191191

192192
public double ButtonRadiusInnerRatio
193193
{

MaterialDesignThemes.Wpf/ClockItemButton.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class ClockItemButton : ToggleButton
1212
public const string ThumbPartName = "PART_Thumb";
1313

1414
public static readonly DependencyProperty CentreXProperty = DependencyProperty.Register(
15-
"CentreX", typeof (double), typeof (ClockItemButton), new PropertyMetadata(default(double)));
15+
nameof(CentreX), typeof (double), typeof (ClockItemButton), new PropertyMetadata(default(double)));
1616

1717
public double CentreX
1818
{
@@ -21,7 +21,7 @@ public double CentreX
2121
}
2222

2323
public static readonly DependencyProperty CentreYProperty = DependencyProperty.Register(
24-
"CentreY", typeof (double), typeof (ClockItemButton), new PropertyMetadata(default(double)));
24+
nameof(CentreY), typeof (double), typeof (ClockItemButton), new PropertyMetadata(default(double)));
2525

2626
public double CentreY
2727
{

MaterialDesignThemes.Wpf/ColorZone.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static ColorZone()
3838
}
3939

4040
public static readonly DependencyProperty ModeProperty = DependencyProperty.Register(
41-
"Mode", typeof (ColorZoneMode), typeof (ColorZone), new PropertyMetadata(default(ColorZoneMode)));
41+
nameof(Mode), typeof (ColorZoneMode), typeof (ColorZone), new PropertyMetadata(default(ColorZoneMode)));
4242

4343
public ColorZoneMode Mode
4444
{
@@ -47,7 +47,7 @@ public ColorZoneMode Mode
4747
}
4848

4949
public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register(
50-
"CornerRadius", typeof (CornerRadius), typeof (ColorZone), new PropertyMetadata(default(CornerRadius)));
50+
nameof(CornerRadius), typeof (CornerRadius), typeof (ColorZone), new PropertyMetadata(default(CornerRadius)));
5151

5252
public CornerRadius CornerRadius
5353
{

MaterialDesignThemes.Wpf/ComboBoxPopup.cs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Diagnostics;
42
using System.Linq;
5-
using System.Reflection;
6-
using System.Text;
7-
using System.Threading.Tasks;
83
using System.Windows;
94
using System.Windows.Controls;
105
using System.Windows.Controls.Primitives;
@@ -14,7 +9,7 @@ namespace MaterialDesignThemes.Wpf
149
public class ComboBoxPopup : Popup
1510
{
1611
public static readonly DependencyProperty UpContentTemplateProperty
17-
= DependencyProperty.Register(nameof(UpContentTemplateProperty),
12+
= DependencyProperty.Register(nameof(UpContentTemplate),
1813
typeof(ControlTemplate),
1914
typeof(ComboBoxPopup),
2015
new UIPropertyMetadata(null));
@@ -26,7 +21,7 @@ public ControlTemplate UpContentTemplate
2621
}
2722

2823
public static readonly DependencyProperty DownContentTemplateProperty
29-
= DependencyProperty.Register(nameof(DownContentTemplateProperty),
24+
= DependencyProperty.Register(nameof(DownContentTemplate),
3025
typeof(ControlTemplate),
3126
typeof(ComboBoxPopup),
3227
new UIPropertyMetadata(null));
@@ -38,7 +33,7 @@ public ControlTemplate DownContentTemplate
3833
}
3934

4035
public static readonly DependencyProperty DefaultContentTemplateProperty
41-
= DependencyProperty.Register(nameof(DefaultContentTemplateProperty),
36+
= DependencyProperty.Register(nameof(DefaultContentTemplate),
4237
typeof(ControlTemplate),
4338
typeof(ComboBoxPopup),
4439
new UIPropertyMetadata(null));
@@ -50,7 +45,7 @@ public ControlTemplate DefaultContentTemplate
5045
}
5146

5247
public static readonly DependencyProperty UpVerticalOffsetProperty
53-
= DependencyProperty.Register(nameof(UpVerticalOffsetProperty),
48+
= DependencyProperty.Register(nameof(UpVerticalOffset),
5449
typeof(double),
5550
typeof(ComboBoxPopup),
5651
new PropertyMetadata(0.0));
@@ -62,7 +57,7 @@ public double UpVerticalOffset
6257
}
6358

6459
public static readonly DependencyProperty DownVerticalOffsetProperty
65-
= DependencyProperty.Register(nameof(DownVerticalOffsetProperty),
60+
= DependencyProperty.Register(nameof(DownVerticalOffset),
6661
typeof(double),
6762
typeof(ComboBoxPopup),
6863
new PropertyMetadata(0.0));
@@ -74,7 +69,7 @@ public double DownVerticalOffset
7469
}
7570

7671
public static readonly DependencyProperty DefaultVerticalOffsetProperty
77-
= DependencyProperty.Register(nameof(DefaultVerticalOffsetProperty),
72+
= DependencyProperty.Register(nameof(DefaultVerticalOffset),
7873
typeof(double),
7974
typeof(ComboBoxPopup),
8075
new PropertyMetadata(0.0));

0 commit comments

Comments
 (0)