Skip to content

Commit 5d3edb9

Browse files
committed
Rename ComboBoxAssist.OnlyClassicMode to ClassicMode
1 parent d369b46 commit 5d3edb9

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

MainDemo.Wpf/TextFields.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@
275275
<ComboBoxItem>Orange</ComboBoxItem>
276276
</ComboBox>
277277
<CheckBox Grid.Row="11" Grid.Column="4"
278-
x:Name="OnlyClassicModeCheckBox"
278+
x:Name="ClassicModeCheckBox"
279279
IsThreeState="False" IsChecked="True"
280280
Margin="0 8 0 0">Use classic mode</CheckBox>
281281
<ComboBox Grid.Row="12" Grid.Column="4"
282-
materialDesign:ComboBoxAssist.OnlyClassicMode="{Binding ElementName=OnlyClassicModeCheckBox, Path=IsChecked}"
282+
materialDesign:ComboBoxAssist.ClassicMode="{Binding ElementName=ClassicModeCheckBox, Path=IsChecked}"
283283
Margin="0 8 0 8" HorizontalAlignment="Left">
284284
<ComboBoxItem IsSelected="True">Apple</ComboBoxItem>
285285
<ComboBoxItem>Banana</ComboBoxItem>

MaterialDesignThemes.Wpf/ComboBoxAssist.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ public static class ComboBoxAssist
1212
/// <summary>
1313
/// By default ComboBox uses the wrapper popup. Popup can be switched to classic Windows desktop view by means of this attached property.
1414
/// </summary>
15-
public static readonly DependencyProperty OnlyClassicModeProperty = DependencyProperty.RegisterAttached(
16-
"OnlyClassicMode",
15+
public static readonly DependencyProperty ClassicModeProperty = DependencyProperty.RegisterAttached(
16+
"ClassicMode",
1717
typeof (bool),
1818
typeof (ComboBoxAssist),
1919
new FrameworkPropertyMetadata(false,
2020
FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.Inherits));
2121

22-
public static bool GetOnlyClassicMode(DependencyObject element, object value)
22+
public static bool GetClassicMode(DependencyObject element, object value)
2323
{
24-
return (bool)element.GetValue(OnlyClassicModeProperty);
24+
return (bool)element.GetValue(ClassicModeProperty);
2525
}
2626

27-
public static void SetOnlyClassicMode(DependencyObject element, object value)
27+
public static void SetClassicMode(DependencyObject element, object value)
2828
{
29-
element.SetValue(OnlyClassicModeProperty, value);
29+
element.SetValue(ClassicModeProperty, value);
3030
}
3131

3232
/// <summary>

MaterialDesignThemes.Wpf/ComboBoxPopup.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,19 @@ public static readonly DependencyProperty VisiblePlacementWidthProperty
167167

168168
#endregion
169169

170-
#region OnlyClassicMode property
170+
#region ClassicMode property
171171

172-
public static readonly DependencyProperty OnlyClassicModeProperty
172+
public static readonly DependencyProperty ClassicModeProperty
173173
= DependencyProperty.Register(
174-
nameof(OnlyClassicMode),
174+
nameof(ClassicMode),
175175
typeof(bool),
176176
typeof(ComboBoxPopup),
177177
new FrameworkPropertyMetadata(true));
178178

179-
public bool OnlyClassicMode
179+
public bool ClassicMode
180180
{
181-
get { return (bool)GetValue(OnlyClassicModeProperty); }
182-
set { SetValue(OnlyClassicModeProperty, value); }
181+
get { return (bool)GetValue(ClassicModeProperty); }
182+
set { SetValue(ClassicModeProperty, value); }
183183
}
184184

185185
#endregion
@@ -228,7 +228,7 @@ private CustomPopupPlacement[] ComboBoxCustomPopupPlacementCallback(
228228

229229
var data = GetPositioningData(visualAncestry, popupSize, targetSize, offset);
230230

231-
if (OnlyClassicMode ||
231+
if (ClassicMode ||
232232
(data.LocationX + data.PopupSize.Width - data.RealOffsetX > data.ScreenWidth
233233
|| data.LocationX - data.RealOffsetX < 0))
234234
{

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@
459459
DefaultVerticalOffset="5"
460460
DownVerticalOffset="-15.5"
461461
UpVerticalOffset="15"
462-
OnlyClassicMode="{Binding Path=(wpf:ComboBoxAssist.OnlyClassicMode), RelativeSource={RelativeSource TemplatedParent}}"
462+
ClassicMode="{Binding Path=(wpf:ComboBoxAssist.ClassicMode), RelativeSource={RelativeSource TemplatedParent}}"
463463
UpContentTemplate="{StaticResource PopupContentUpTemplate}"
464464
DownContentTemplate="{StaticResource PopupContentDownTemplate}"
465465
ClassicContentTemplate="{StaticResource PopupContentClassicTemplate}">

0 commit comments

Comments
 (0)