chore: use nameof expression.

This commit is contained in:
NaBian committed 2022-10-10 23:15:48 +08:00
1 parent 3876444176
commit c513f5c6f5
116 files changed
+507 -507

No files matched your search

@@ -136,7 +136,7 @@ public class SideMenu : HeaderedSimpleItemsControl
protected override bool IsItemItsOwnContainerOverride(object item) => item is SideMenuItem;
public static readonly DependencyProperty AutoSelectProperty = DependencyProperty.Register(
"AutoSelect", typeof(bool), typeof(SideMenu), new PropertyMetadata(ValueBoxes.TrueBox));
nameof(AutoSelect), typeof(bool), typeof(SideMenu), new PropertyMetadata(ValueBoxes.TrueBox));
public bool AutoSelect
{
@@ -145,7 +145,7 @@ public class SideMenu : HeaderedSimpleItemsControl
}
public static readonly DependencyProperty ExpandModeProperty = DependencyProperty.Register(
"ExpandMode", typeof(ExpandMode), typeof(SideMenu), new PropertyMetadata(default(ExpandMode), OnExpandModeChanged));
nameof(ExpandMode), typeof(ExpandMode), typeof(SideMenu), new PropertyMetadata(default(ExpandMode), OnExpandModeChanged));
private static void OnExpandModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -223,7 +223,7 @@ public class SideMenu : HeaderedSimpleItemsControl
}
public static readonly DependencyProperty PanelAreaLengthProperty = DependencyProperty.Register(
"PanelAreaLength", typeof(double), typeof(SideMenu), new PropertyMetadata(double.NaN));
nameof(PanelAreaLength), typeof(double), typeof(SideMenu), new PropertyMetadata(double.NaN));
public double PanelAreaLength
{
@@ -13,7 +13,7 @@ public class SideMenuItem : HeaderedSimpleItemsControl, ISelectable, ICommandSou
private bool _isMouseLeftButtonDown;
public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
"Icon", typeof(object), typeof(SideMenuItem), new PropertyMetadata(default(object)));
nameof(Icon), typeof(object), typeof(SideMenuItem), new PropertyMetadata(default(object)));
public object Icon
{
@@ -97,7 +97,7 @@ public class SideMenuItem : HeaderedSimpleItemsControl, ISelectable, ICommandSou
}
public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(
"IsSelected", typeof(bool), typeof(SideMenuItem), new PropertyMetadata(ValueBoxes.FalseBox));
nameof(IsSelected), typeof(bool), typeof(SideMenuItem), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsSelected
{
@@ -106,7 +106,7 @@ public class SideMenuItem : HeaderedSimpleItemsControl, ISelectable, ICommandSou
}
public static readonly DependencyProperty RoleProperty = DependencyProperty.Register(
"Role", typeof(SideMenuItemRole), typeof(SideMenuItem), new PropertyMetadata(default(SideMenuItemRole)));
nameof(Role), typeof(SideMenuItemRole), typeof(SideMenuItem), new PropertyMetadata(default(SideMenuItemRole)));
public SideMenuItemRole Role
{
@@ -166,7 +166,7 @@ public class SideMenuItem : HeaderedSimpleItemsControl, ISelectable, ICommandSou
}
public static readonly DependencyProperty CommandProperty = DependencyProperty.Register(
"Command", typeof(ICommand), typeof(SideMenuItem), new PropertyMetadata(default(ICommand), OnCommandChanged));
nameof(Command), typeof(ICommand), typeof(SideMenuItem), new PropertyMetadata(default(ICommand), OnCommandChanged));
private static void OnCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -188,7 +188,7 @@ public class SideMenuItem : HeaderedSimpleItemsControl, ISelectable, ICommandSou
}
public static readonly DependencyProperty CommandParameterProperty = DependencyProperty.Register(
"CommandParameter", typeof(object), typeof(SideMenuItem), new PropertyMetadata(default(object)));
nameof(CommandParameter), typeof(object), typeof(SideMenuItem), new PropertyMetadata(default(object)));
public object CommandParameter
{
@@ -197,7 +197,7 @@ public class SideMenuItem : HeaderedSimpleItemsControl, ISelectable, ICommandSou
}
public static readonly DependencyProperty CommandTargetProperty = DependencyProperty.Register(
"CommandTarget", typeof(IInputElement), typeof(SideMenuItem), new PropertyMetadata(default(IInputElement)));
nameof(CommandTarget), typeof(IInputElement), typeof(SideMenuItem), new PropertyMetadata(default(IInputElement)));
public IInputElement CommandTarget
{