diff --git a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
index 2afdc820..c1dfe81e 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
@@ -3428,42 +3428,42 @@
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/Avatar.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/Avatar.xaml.cs
index 1a3502da..4eb1df39 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/Avatar.xaml.cs
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/Avatar.xaml.cs
@@ -11,7 +11,7 @@ public partial class Avatar
}
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
- "Source", typeof(BitmapFrame), typeof(Avatar), new PropertyMetadata(default(BitmapFrame)));
+ nameof(Source), typeof(BitmapFrame), typeof(Avatar), new PropertyMetadata(default(BitmapFrame)));
public BitmapFrame Source
{
@@ -20,7 +20,7 @@ public partial class Avatar
}
public static readonly DependencyProperty UserNameProperty = DependencyProperty.Register(
- "DisplayName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
+ nameof(DisplayName), typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
public string DisplayName
{
@@ -29,7 +29,7 @@ public partial class Avatar
}
public static readonly DependencyProperty LinkProperty = DependencyProperty.Register(
- "Link", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
+ nameof(Link), typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
public string Link
{
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml.cs
index 6849200c..1fb02172 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml.cs
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml.cs
@@ -8,7 +8,7 @@ public partial class GeometryItem
public GeometryItem() => InitializeComponent();
public static readonly DependencyProperty InfoProperty = DependencyProperty.Register(
- "Info", typeof(GeometryItemModel), typeof(GeometryItem), new PropertyMetadata(default(GeometryItemModel)));
+ nameof(Info), typeof(GeometryItemModel), typeof(GeometryItem), new PropertyMetadata(default(GeometryItemModel)));
public GeometryItemModel Info
{
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressButtonDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressButtonDemoCtl.xaml.cs
index 5ff7442c..6dc4017d 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressButtonDemoCtl.xaml.cs
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressButtonDemoCtl.xaml.cs
@@ -7,7 +7,7 @@ namespace HandyControlDemo.UserControl;
public partial class ProgressButtonDemoCtl
{
public static readonly DependencyProperty ProgressProperty = DependencyProperty.Register(
- "Progress", typeof(int), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(int)));
+ nameof(Progress), typeof(int), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(int)));
public int Progress
{
@@ -16,7 +16,7 @@ public partial class ProgressButtonDemoCtl
}
public static readonly DependencyProperty IsUploadingProperty = DependencyProperty.Register(
- "IsUploading", typeof(bool), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(bool)));
+ nameof(IsUploading), typeof(bool), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(bool)));
public bool IsUploading
{
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PropertyGridDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PropertyGridDemoCtl.xaml.cs
index bcdda5fb..a919cb5b 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PropertyGridDemoCtl.xaml.cs
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PropertyGridDemoCtl.xaml.cs
@@ -20,7 +20,7 @@ public partial class PropertyGridDemoCtl
}
public static readonly DependencyProperty DemoModelProperty = DependencyProperty.Register(
- "DemoModel", typeof(PropertyGridDemoModel), typeof(PropertyGridDemoCtl), new PropertyMetadata(default(PropertyGridDemoModel)));
+ nameof(DemoModel), typeof(PropertyGridDemoModel), typeof(PropertyGridDemoCtl), new PropertyMetadata(default(PropertyGridDemoModel)));
public PropertyGridDemoModel DemoModel
{
diff --git a/src/Shared/HandyControlDemo_Shared/Window/AboutWindow.xaml.cs b/src/Shared/HandyControlDemo_Shared/Window/AboutWindow.xaml.cs
index 9c8b3d5f..d5ca5245 100644
--- a/src/Shared/HandyControlDemo_Shared/Window/AboutWindow.xaml.cs
+++ b/src/Shared/HandyControlDemo_Shared/Window/AboutWindow.xaml.cs
@@ -15,7 +15,7 @@ public partial class AboutWindow
}
public static readonly DependencyProperty CopyRightProperty = DependencyProperty.Register(
- "CopyRight", typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));
+ nameof(CopyRight), typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));
public string CopyRight
{
@@ -24,7 +24,7 @@ public partial class AboutWindow
}
public static readonly DependencyProperty VersionProperty = DependencyProperty.Register(
- "Version", typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));
+ nameof(Version), typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));
public string Version
{
diff --git a/src/Shared/HandyControlDemo_Shared/Window/DialogDemoWindow.xaml.cs b/src/Shared/HandyControlDemo_Shared/Window/DialogDemoWindow.xaml.cs
index da286df7..701eba35 100644
--- a/src/Shared/HandyControlDemo_Shared/Window/DialogDemoWindow.xaml.cs
+++ b/src/Shared/HandyControlDemo_Shared/Window/DialogDemoWindow.xaml.cs
@@ -17,7 +17,7 @@ public partial class DialogDemoWindow
}
public static readonly DependencyProperty DialogTokenProperty = DependencyProperty.Register(
- "DialogToken", typeof(string), typeof(DialogDemoWindow), new PropertyMetadata(default(string)));
+ nameof(DialogToken), typeof(string), typeof(DialogDemoWindow), new PropertyMetadata(default(string)));
public string DialogToken
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Base/AdornerElement.cs b/src/Shared/HandyControl_Shared/Controls/Base/AdornerElement.cs
index 0a5c3bb8..17f16f6e 100644
--- a/src/Shared/HandyControl_Shared/Controls/Base/AdornerElement.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Base/AdornerElement.cs
@@ -11,7 +11,7 @@ public abstract class AdornerElement : Control, IDisposable
protected FrameworkElement ElementTarget { get; set; }
public static readonly DependencyProperty TargetProperty = DependencyProperty.Register(
- "Target", typeof(FrameworkElement), typeof(AdornerElement), new PropertyMetadata(default(FrameworkElement), OnTargetChanged));
+ nameof(Target), typeof(FrameworkElement), typeof(AdornerElement), new PropertyMetadata(default(FrameworkElement), OnTargetChanged));
private static void OnTargetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Base/HeaderedSelectableItem.cs b/src/Shared/HandyControl_Shared/Controls/Base/HeaderedSelectableItem.cs
index e76a0b2c..1d3e70fc 100644
--- a/src/Shared/HandyControl_Shared/Controls/Base/HeaderedSelectableItem.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Base/HeaderedSelectableItem.cs
@@ -5,7 +5,7 @@ namespace HandyControl.Controls;
public class HeaderedSelectableItem : SelectableItem
{
public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register(
- "Header", typeof(object), typeof(HeaderedSelectableItem), new PropertyMetadata(default(object)));
+ nameof(Header), typeof(object), typeof(HeaderedSelectableItem), new PropertyMetadata(default(object)));
public object Header
{
@@ -14,7 +14,7 @@ public class HeaderedSelectableItem : SelectableItem
}
public static readonly DependencyProperty HeaderTemplateProperty = DependencyProperty.Register(
- "HeaderTemplate", typeof(DataTemplate), typeof(HeaderedSelectableItem), new PropertyMetadata(default(DataTemplate)));
+ nameof(HeaderTemplate), typeof(DataTemplate), typeof(HeaderedSelectableItem), new PropertyMetadata(default(DataTemplate)));
public DataTemplate HeaderTemplate
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Base/HeaderedSimpleItemsControl.cs b/src/Shared/HandyControl_Shared/Controls/Base/HeaderedSimpleItemsControl.cs
index 48db14c8..f1617da5 100644
--- a/src/Shared/HandyControl_Shared/Controls/Base/HeaderedSimpleItemsControl.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Base/HeaderedSimpleItemsControl.cs
@@ -5,7 +5,7 @@ namespace HandyControl.Controls;
public class HeaderedSimpleItemsControl : SimpleItemsControl
{
public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register(
- "Header", typeof(object), typeof(HeaderedSimpleItemsControl), new PropertyMetadata(default(object)));
+ nameof(Header), typeof(object), typeof(HeaderedSimpleItemsControl), new PropertyMetadata(default(object)));
public object Header
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Base/RegularItemsControl.cs b/src/Shared/HandyControl_Shared/Controls/Base/RegularItemsControl.cs
index 8dc00f9a..83b65ad7 100644
--- a/src/Shared/HandyControl_Shared/Controls/Base/RegularItemsControl.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Base/RegularItemsControl.cs
@@ -12,7 +12,7 @@ namespace HandyControl.Controls;
public class RegularItemsControl : SimpleItemsControl
{
public static readonly DependencyProperty ItemWidthProperty = DependencyProperty.Register(
- "ItemWidth", typeof(double), typeof(RegularItemsControl), new PropertyMetadata(ValueBoxes.Double200Box));
+ nameof(ItemWidth), typeof(double), typeof(RegularItemsControl), new PropertyMetadata(ValueBoxes.Double200Box));
public double ItemWidth
{
@@ -21,7 +21,7 @@ public class RegularItemsControl : SimpleItemsControl
}
public static readonly DependencyProperty ItemHeightProperty = DependencyProperty.Register(
- "ItemHeight", typeof(double), typeof(RegularItemsControl), new PropertyMetadata(ValueBoxes.Double200Box));
+ nameof(ItemHeight), typeof(double), typeof(RegularItemsControl), new PropertyMetadata(ValueBoxes.Double200Box));
public double ItemHeight
{
@@ -30,7 +30,7 @@ public class RegularItemsControl : SimpleItemsControl
}
public static readonly DependencyProperty ItemMarginProperty = DependencyProperty.Register(
- "ItemMargin", typeof(Thickness), typeof(RegularItemsControl), new PropertyMetadata(default(Thickness)));
+ nameof(ItemMargin), typeof(Thickness), typeof(RegularItemsControl), new PropertyMetadata(default(Thickness)));
public Thickness ItemMargin
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Base/SelectableItem.cs b/src/Shared/HandyControl_Shared/Controls/Base/SelectableItem.cs
index 07df5d67..1b0a817c 100644
--- a/src/Shared/HandyControl_Shared/Controls/Base/SelectableItem.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Base/SelectableItem.cs
@@ -62,7 +62,7 @@ public class SelectableItem : ContentControl, ISelectable
protected virtual void OnSelected(RoutedEventArgs e) => RaiseEvent(e);
public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(
- "IsSelected", typeof(bool), typeof(SelectableItem), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsSelected), typeof(bool), typeof(SelectableItem), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsSelected
{
@@ -71,7 +71,7 @@ public class SelectableItem : ContentControl, ISelectable
}
public static readonly DependencyProperty SelfManageProperty = DependencyProperty.Register(
- "SelfManage", typeof(bool), typeof(SelectableItem), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(SelfManage), typeof(bool), typeof(SelectableItem), new PropertyMetadata(ValueBoxes.FalseBox));
public bool SelfManage
{
@@ -80,7 +80,7 @@ public class SelectableItem : ContentControl, ISelectable
}
public static readonly DependencyProperty CanDeselectProperty = DependencyProperty.Register(
- "CanDeselect", typeof(bool), typeof(SelectableItem), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(CanDeselect), typeof(bool), typeof(SelectableItem), new PropertyMetadata(ValueBoxes.FalseBox));
public bool CanDeselect
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Base/SimpleItemsControl.cs b/src/Shared/HandyControl_Shared/Controls/Base/SimpleItemsControl.cs
index a6de57b5..0151e144 100644
--- a/src/Shared/HandyControl_Shared/Controls/Base/SimpleItemsControl.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Base/SimpleItemsControl.cs
@@ -20,15 +20,15 @@ public class SimpleItemsControl : Control
private const string ElementPanel = "PART_Panel";
public static readonly DependencyProperty ItemTemplateProperty = DependencyProperty.Register(
- "ItemTemplate", typeof(DataTemplate), typeof(SimpleItemsControl),
+ nameof(ItemTemplate), typeof(DataTemplate), typeof(SimpleItemsControl),
new FrameworkPropertyMetadata(default(DataTemplate), OnItemTemplateChanged));
public static readonly DependencyProperty ItemContainerStyleProperty = DependencyProperty.Register(
- "ItemContainerStyle", typeof(Style), typeof(SimpleItemsControl),
+ nameof(ItemContainerStyle), typeof(Style), typeof(SimpleItemsControl),
new PropertyMetadata(default(Style), OnItemContainerStyleChanged));
public static readonly DependencyProperty ItemsSourceProperty = DependencyProperty.Register(
- "ItemsSource", typeof(IEnumerable), typeof(SimpleItemsControl),
+ nameof(ItemsSource), typeof(IEnumerable), typeof(SimpleItemsControl),
new PropertyMetadata(default(IEnumerable), OnItemsSourceChanged));
public SimpleItemsControl()
diff --git a/src/Shared/HandyControl_Shared/Controls/Block/RunningBlock/RunningBlock.cs b/src/Shared/HandyControl_Shared/Controls/Block/RunningBlock/RunningBlock.cs
index 3dbc02f4..c0072681 100644
--- a/src/Shared/HandyControl_Shared/Controls/Block/RunningBlock/RunningBlock.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Block/RunningBlock/RunningBlock.cs
@@ -50,7 +50,7 @@ public class RunningBlock : ContentControl
private void ElementPanel_SizeChanged(object sender, SizeChangedEventArgs e) => UpdateContent();
public static readonly DependencyProperty RunawayProperty = DependencyProperty.Register(
- "Runaway", typeof(bool), typeof(RunningBlock), new FrameworkPropertyMetadata(ValueBoxes.TrueBox, FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(Runaway), typeof(bool), typeof(RunningBlock), new FrameworkPropertyMetadata(ValueBoxes.TrueBox, FrameworkPropertyMetadataOptions.AffectsRender));
public bool Runaway
{
@@ -59,7 +59,7 @@ public class RunningBlock : ContentControl
}
public static readonly DependencyProperty AutoRunProperty = DependencyProperty.Register(
- "AutoRun", typeof(bool), typeof(RunningBlock), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(AutoRun), typeof(bool), typeof(RunningBlock), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
public bool AutoRun
{
@@ -68,7 +68,7 @@ public class RunningBlock : ContentControl
}
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
- "Orientation", typeof(Orientation), typeof(RunningBlock), new FrameworkPropertyMetadata(default(Orientation), FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(Orientation), typeof(Orientation), typeof(RunningBlock), new FrameworkPropertyMetadata(default(Orientation), FrameworkPropertyMetadataOptions.AffectsRender));
public Orientation Orientation
{
@@ -77,7 +77,7 @@ public class RunningBlock : ContentControl
}
public static readonly DependencyProperty DurationProperty = DependencyProperty.Register(
- "Duration", typeof(Duration), typeof(RunningBlock), new FrameworkPropertyMetadata(new Duration(TimeSpan.FromSeconds(5)), FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(Duration), typeof(Duration), typeof(RunningBlock), new FrameworkPropertyMetadata(new Duration(TimeSpan.FromSeconds(5)), FrameworkPropertyMetadataOptions.AffectsRender));
public Duration Duration
{
@@ -86,7 +86,7 @@ public class RunningBlock : ContentControl
}
public static readonly DependencyProperty SpeedProperty = DependencyProperty.Register(
- "Speed", typeof(double), typeof(RunningBlock), new FrameworkPropertyMetadata(double.NaN, FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(Speed), typeof(double), typeof(RunningBlock), new FrameworkPropertyMetadata(double.NaN, FrameworkPropertyMetadataOptions.AffectsRender));
public double Speed
{
@@ -95,7 +95,7 @@ public class RunningBlock : ContentControl
}
public static readonly DependencyProperty IsRunningProperty = DependencyProperty.Register(
- "IsRunning", typeof(bool), typeof(RunningBlock), new PropertyMetadata(ValueBoxes.TrueBox, (o, args) =>
+ nameof(IsRunning), typeof(bool), typeof(RunningBlock), new PropertyMetadata(ValueBoxes.TrueBox, (o, args) =>
{
var ctl = (RunningBlock) o;
var v = (bool) args.NewValue;
@@ -116,7 +116,7 @@ public class RunningBlock : ContentControl
}
public static readonly DependencyProperty AutoReverseProperty = DependencyProperty.Register(
- "AutoReverse", typeof(bool), typeof(RunningBlock), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(AutoReverse), typeof(bool), typeof(RunningBlock), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
public bool AutoReverse
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Block/ToggleBlock.cs b/src/Shared/HandyControl_Shared/Controls/Block/ToggleBlock.cs
index ff0997c1..7ec2d88d 100644
--- a/src/Shared/HandyControl_Shared/Controls/Block/ToggleBlock.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Block/ToggleBlock.cs
@@ -11,7 +11,7 @@ namespace HandyControl.Controls;
public class ToggleBlock : Control
{
public static readonly DependencyProperty IsCheckedProperty = DependencyProperty.Register(
- "IsChecked", typeof(bool?), typeof(ToggleBlock), new FrameworkPropertyMetadata(ValueBoxes.FalseBox,
+ nameof(IsChecked), typeof(bool?), typeof(ToggleBlock), new FrameworkPropertyMetadata(ValueBoxes.FalseBox,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault | FrameworkPropertyMetadataOptions.Journal));
[Category("Appearance")]
@@ -30,7 +30,7 @@ public class ToggleBlock : Control
}
public static readonly DependencyProperty CheckedContentProperty = DependencyProperty.Register(
- "CheckedContent", typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
+ nameof(CheckedContent), typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
public object CheckedContent
{
@@ -39,7 +39,7 @@ public class ToggleBlock : Control
}
public static readonly DependencyProperty UnCheckedContentProperty = DependencyProperty.Register(
- "UnCheckedContent", typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
+ nameof(UnCheckedContent), typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
public object UnCheckedContent
{
@@ -48,7 +48,7 @@ public class ToggleBlock : Control
}
public static readonly DependencyProperty IndeterminateContentProperty = DependencyProperty.Register(
- "IndeterminateContent", typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
+ nameof(IndeterminateContent), typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
public object IndeterminateContent
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Button/ButtonGroup.cs b/src/Shared/HandyControl_Shared/Controls/Button/ButtonGroup.cs
index 9b569b42..423e2f5d 100644
--- a/src/Shared/HandyControl_Shared/Controls/Button/ButtonGroup.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Button/ButtonGroup.cs
@@ -11,7 +11,7 @@ public class ButtonGroup : ItemsControl
protected override bool IsItemItsOwnContainerOverride(object item) => item is Button or RadioButton or ToggleButton;
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
- "Orientation", typeof(Orientation), typeof(ButtonGroup), new PropertyMetadata(default(Orientation)));
+ nameof(Orientation), typeof(Orientation), typeof(ButtonGroup), new PropertyMetadata(default(Orientation)));
public Orientation Orientation
{
@@ -20,7 +20,7 @@ public class ButtonGroup : ItemsControl
}
public static readonly DependencyProperty LayoutProperty = DependencyProperty.Register(
- "Layout", typeof(LinearLayout), typeof(ButtonGroup), new PropertyMetadata(LinearLayout.Uniform));
+ nameof(Layout), typeof(LinearLayout), typeof(ButtonGroup), new PropertyMetadata(LinearLayout.Uniform));
public LinearLayout Layout
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Button/ProgressButton.cs b/src/Shared/HandyControl_Shared/Controls/Button/ProgressButton.cs
index 7cf680ea..e2cbd7bd 100644
--- a/src/Shared/HandyControl_Shared/Controls/Button/ProgressButton.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Button/ProgressButton.cs
@@ -7,7 +7,7 @@ namespace HandyControl.Controls;
public class ProgressButton : ToggleButton
{
public static readonly DependencyProperty ProgressStyleProperty = DependencyProperty.Register(
- "ProgressStyle", typeof(Style), typeof(ProgressButton), new PropertyMetadata(default(Style)));
+ nameof(ProgressStyle), typeof(Style), typeof(ProgressButton), new PropertyMetadata(default(Style)));
public Style ProgressStyle
{
@@ -16,7 +16,7 @@ public class ProgressButton : ToggleButton
}
public static readonly DependencyProperty ProgressProperty = DependencyProperty.Register(
- "Progress", typeof(double), typeof(ProgressButton), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(Progress), typeof(double), typeof(ProgressButton), new PropertyMetadata(ValueBoxes.Double0Box));
public double Progress
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Button/SplitButton.cs b/src/Shared/HandyControl_Shared/Controls/Button/SplitButton.cs
index acb762a9..2d28c122 100644
--- a/src/Shared/HandyControl_Shared/Controls/Button/SplitButton.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Button/SplitButton.cs
@@ -10,7 +10,7 @@ namespace HandyControl.Controls;
public class SplitButton : ButtonBase
{
public static readonly DependencyProperty HitModeProperty = DependencyProperty.Register(
- "HitMode", typeof(HitMode), typeof(SplitButton), new PropertyMetadata(default(HitMode)));
+ nameof(HitMode), typeof(HitMode), typeof(SplitButton), new PropertyMetadata(default(HitMode)));
public HitMode HitMode
{
@@ -19,7 +19,7 @@ public class SplitButton : ButtonBase
}
public static readonly DependencyProperty MaxDropDownHeightProperty = DependencyProperty.Register(
- "MaxDropDownHeight", typeof(double), typeof(SplitButton), new PropertyMetadata(SystemParameters.PrimaryScreenHeight / 3.0));
+ nameof(MaxDropDownHeight), typeof(double), typeof(SplitButton), new PropertyMetadata(SystemParameters.PrimaryScreenHeight / 3.0));
public double MaxDropDownHeight
{
@@ -28,7 +28,7 @@ public class SplitButton : ButtonBase
}
public static readonly DependencyProperty IsDropDownOpenProperty = DependencyProperty.Register(
- "IsDropDownOpen", typeof(bool), typeof(SplitButton), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsDropDownOpen), typeof(bool), typeof(SplitButton), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsDropDownOpen
{
@@ -37,7 +37,7 @@ public class SplitButton : ButtonBase
}
public static readonly DependencyProperty DropDownContentProperty = DependencyProperty.Register(
- "DropDownContent", typeof(object), typeof(SplitButton), new PropertyMetadata(default(object)));
+ nameof(DropDownContent), typeof(object), typeof(SplitButton), new PropertyMetadata(default(object)));
public object DropDownContent
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Carousel/Carousel.cs b/src/Shared/HandyControl_Shared/Controls/Carousel/Carousel.cs
index d2c689c1..cadb86af 100644
--- a/src/Shared/HandyControl_Shared/Controls/Carousel/Carousel.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Carousel/Carousel.cs
@@ -80,17 +80,17 @@ public class Carousel : SimpleItemsControl, IDisposable
private bool CheckNull() => _panelPage != null;
public static readonly DependencyProperty AutoRunProperty = DependencyProperty.Register(
- "AutoRun", typeof(bool), typeof(Carousel), new PropertyMetadata(ValueBoxes.FalseBox, (o, args) =>
+ nameof(AutoRun), typeof(bool), typeof(Carousel), new PropertyMetadata(ValueBoxes.FalseBox, (o, args) =>
{
var ctl = (Carousel) o;
ctl.TimerSwitch((bool) args.NewValue);
}));
public static readonly DependencyProperty IntervalProperty = DependencyProperty.Register(
- "Interval", typeof(TimeSpan), typeof(Carousel), new PropertyMetadata(TimeSpan.FromSeconds(2)));
+ nameof(Interval), typeof(TimeSpan), typeof(Carousel), new PropertyMetadata(TimeSpan.FromSeconds(2)));
public static readonly DependencyProperty ExtendWidthProperty = DependencyProperty.Register(
- "ExtendWidth", typeof(double), typeof(Carousel), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(ExtendWidth), typeof(double), typeof(Carousel), new PropertyMetadata(ValueBoxes.Double0Box));
public double ExtendWidth
{
@@ -99,7 +99,7 @@ public class Carousel : SimpleItemsControl, IDisposable
}
public static readonly DependencyProperty IsCenterProperty = DependencyProperty.Register(
- "IsCenter", typeof(bool), typeof(Carousel), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsCenter), typeof(bool), typeof(Carousel), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsCenter
{
@@ -108,7 +108,7 @@ public class Carousel : SimpleItemsControl, IDisposable
}
public static readonly DependencyProperty PageButtonStyleProperty = DependencyProperty.Register(
- "PageButtonStyle", typeof(Style), typeof(Carousel), new PropertyMetadata(default(Style)));
+ nameof(PageButtonStyle), typeof(Style), typeof(Carousel), new PropertyMetadata(default(Style)));
public Style PageButtonStyle
{
diff --git a/src/Shared/HandyControl_Shared/Controls/ColorPicker/ColorPicker.cs b/src/Shared/HandyControl_Shared/Controls/ColorPicker/ColorPicker.cs
index 6d6060a5..d6da624f 100644
--- a/src/Shared/HandyControl_Shared/Controls/ColorPicker/ColorPicker.cs
+++ b/src/Shared/HandyControl_Shared/Controls/ColorPicker/ColorPicker.cs
@@ -225,7 +225,7 @@ public class ColorPicker : Control, ISingleOpen
#region Properties
internal static readonly DependencyProperty ChannelAProperty = DependencyProperty.Register(
- "ChannelA", typeof(int), typeof(ColorPicker), new PropertyMetadata(255));
+ nameof(ChannelA), typeof(int), typeof(ColorPicker), new PropertyMetadata(255));
internal int ChannelA
{
@@ -234,7 +234,7 @@ public class ColorPicker : Control, ISingleOpen
}
internal static readonly DependencyProperty ChannelRProperty = DependencyProperty.Register(
- "ChannelR", typeof(int), typeof(ColorPicker), new PropertyMetadata(255));
+ nameof(ChannelR), typeof(int), typeof(ColorPicker), new PropertyMetadata(255));
internal int ChannelR
{
@@ -243,7 +243,7 @@ public class ColorPicker : Control, ISingleOpen
}
internal static readonly DependencyProperty ChannelGProperty = DependencyProperty.Register(
- "ChannelG", typeof(int), typeof(ColorPicker), new PropertyMetadata(255));
+ nameof(ChannelG), typeof(int), typeof(ColorPicker), new PropertyMetadata(255));
internal int ChannelG
{
@@ -252,7 +252,7 @@ public class ColorPicker : Control, ISingleOpen
}
internal static readonly DependencyProperty ChannelBProperty = DependencyProperty.Register(
- "ChannelB", typeof(int), typeof(ColorPicker), new PropertyMetadata(255));
+ nameof(ChannelB), typeof(int), typeof(ColorPicker), new PropertyMetadata(255));
internal int ChannelB
{
@@ -261,7 +261,7 @@ public class ColorPicker : Control, ISingleOpen
}
public static readonly DependencyProperty SelectedBrushProperty = DependencyProperty.Register(
- "SelectedBrush", typeof(SolidColorBrush), typeof(ColorPicker), new PropertyMetadata(Brushes.White, OnSelectedBrushChanged, CoerceSelectedBrush));
+ nameof(SelectedBrush), typeof(SolidColorBrush), typeof(ColorPicker), new PropertyMetadata(Brushes.White, OnSelectedBrushChanged, CoerceSelectedBrush));
private static object CoerceSelectedBrush(DependencyObject d, object basevalue)
{
@@ -300,7 +300,7 @@ public class ColorPicker : Control, ISingleOpen
}
internal static readonly DependencyProperty SelectedBrushWithoutOpacityProperty = DependencyProperty.Register(
- "SelectedBrushWithoutOpacity", typeof(SolidColorBrush), typeof(ColorPicker), new PropertyMetadata(Brushes.White));
+ nameof(SelectedBrushWithoutOpacity), typeof(SolidColorBrush), typeof(ColorPicker), new PropertyMetadata(Brushes.White));
internal SolidColorBrush SelectedBrushWithoutOpacity
{
@@ -309,7 +309,7 @@ public class ColorPicker : Control, ISingleOpen
}
internal static readonly DependencyProperty BackColorProperty = DependencyProperty.Register(
- "BackColor", typeof(SolidColorBrush), typeof(ColorPicker), new PropertyMetadata(Brushes.Red));
+ nameof(BackColor), typeof(SolidColorBrush), typeof(ColorPicker), new PropertyMetadata(Brushes.Red));
internal SolidColorBrush BackColor
{
@@ -318,7 +318,7 @@ public class ColorPicker : Control, ISingleOpen
}
internal static readonly DependencyProperty ShowListProperty = DependencyProperty.Register(
- "ShowList", typeof(List), typeof(ColorPicker), new PropertyMetadata(new List
+ nameof(ShowList), typeof(List), typeof(ColorPicker), new PropertyMetadata(new List
{
true, false, false
}));
diff --git a/src/Shared/HandyControl_Shared/Controls/Cover/CoverFlow/CoverFlow.cs b/src/Shared/HandyControl_Shared/Controls/Cover/CoverFlow/CoverFlow.cs
index 3bb26bf5..a59307cc 100644
--- a/src/Shared/HandyControl_Shared/Controls/Cover/CoverFlow/CoverFlow.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Cover/CoverFlow/CoverFlow.cs
@@ -35,7 +35,7 @@ public class CoverFlow : Control
/// 页码
///
public static readonly DependencyProperty PageIndexProperty = DependencyProperty.Register(
- "PageIndex", typeof(int), typeof(CoverFlow),
+ nameof(PageIndex), typeof(int), typeof(CoverFlow),
new PropertyMetadata(ValueBoxes.Int0Box, OnPageIndexChanged, CoercePageIndex));
private static object CoercePageIndex(DependencyObject d, object baseValue)
@@ -64,7 +64,7 @@ public class CoverFlow : Control
/// 是否循环
///
public static readonly DependencyProperty LoopProperty = DependencyProperty.Register(
- "Loop", typeof(bool), typeof(CoverFlow), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(Loop), typeof(bool), typeof(CoverFlow), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 存储所有的内容
diff --git a/src/Shared/HandyControl_Shared/Controls/Cover/CoverView/CoverView.cs b/src/Shared/HandyControl_Shared/Controls/Cover/CoverView/CoverView.cs
index 07825942..4bed2129 100644
--- a/src/Shared/HandyControl_Shared/Controls/Cover/CoverView/CoverView.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Cover/CoverView/CoverView.cs
@@ -97,7 +97,7 @@ public class CoverView : RegularItemsControl
protected override bool IsItemItsOwnContainerOverride(object item) => item is CoverViewItem;
public static readonly DependencyProperty CoverViewContentStyleProperty = DependencyProperty.Register(
- "CoverViewContentStyle", typeof(Style), typeof(CoverView), new PropertyMetadata(default(Style)));
+ nameof(CoverViewContentStyle), typeof(Style), typeof(CoverView), new PropertyMetadata(default(Style)));
public Style CoverViewContentStyle
{
@@ -106,7 +106,7 @@ public class CoverView : RegularItemsControl
}
internal static readonly DependencyProperty GroupsProperty = DependencyProperty.Register(
- "Groups", typeof(int), typeof(CoverView),
+ nameof(Groups), typeof(int), typeof(CoverView),
new FrameworkPropertyMetadata(ValueBoxes.Int5Box, FrameworkPropertyMetadataOptions.AffectsMeasure,
OnGroupsChanged, CoerceGroups));
@@ -130,7 +130,7 @@ public class CoverView : RegularItemsControl
}
public static readonly DependencyProperty ItemContentHeightProperty = DependencyProperty.Register(
- "ItemContentHeight", typeof(double), typeof(CoverView), new PropertyMetadata(ValueBoxes.Double300Box),
+ nameof(ItemContentHeight), typeof(double), typeof(CoverView), new PropertyMetadata(ValueBoxes.Double300Box),
ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
public double ItemContentHeight
@@ -140,7 +140,7 @@ public class CoverView : RegularItemsControl
}
public static readonly DependencyProperty ItemContentHeightFixedProperty = DependencyProperty.Register(
- "ItemContentHeightFixed", typeof(bool), typeof(CoverView), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ItemContentHeightFixed), typeof(bool), typeof(CoverView), new PropertyMetadata(ValueBoxes.TrueBox));
public bool ItemContentHeightFixed
{
@@ -149,7 +149,7 @@ public class CoverView : RegularItemsControl
}
public static readonly DependencyProperty ItemHeaderTemplateProperty = DependencyProperty.Register(
- "ItemHeaderTemplate", typeof(DataTemplate), typeof(CoverView), new PropertyMetadata(default(DataTemplate)));
+ nameof(ItemHeaderTemplate), typeof(DataTemplate), typeof(CoverView), new PropertyMetadata(default(DataTemplate)));
public DataTemplate ItemHeaderTemplate
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Cover/CoverView/CoverViewContent.cs b/src/Shared/HandyControl_Shared/Controls/Cover/CoverView/CoverViewContent.cs
index 4615324b..467d0508 100644
--- a/src/Shared/HandyControl_Shared/Controls/Cover/CoverView/CoverViewContent.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Cover/CoverView/CoverViewContent.cs
@@ -43,7 +43,7 @@ public class CoverViewContent : ContentControl
}
internal static readonly DependencyProperty ManualHeightProperty = DependencyProperty.Register(
- "ManualHeight", typeof(double), typeof(CoverViewContent), new PropertyMetadata(ValueBoxes.Double0Box), ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
+ nameof(ManualHeight), typeof(double), typeof(CoverViewContent), new PropertyMetadata(ValueBoxes.Double0Box), ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
internal double ManualHeight
{
@@ -52,7 +52,7 @@ public class CoverViewContent : ContentControl
}
public static readonly DependencyProperty ContentHeightProperty = DependencyProperty.Register(
- "ContentHeight", typeof(double), typeof(CoverViewContent), new PropertyMetadata(ValueBoxes.Double300Box),
+ nameof(ContentHeight), typeof(double), typeof(CoverViewContent), new PropertyMetadata(ValueBoxes.Double300Box),
ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
public double ContentHeight
diff --git a/src/Shared/HandyControl_Shared/Controls/Dialog/Dialog.cs b/src/Shared/HandyControl_Shared/Controls/Dialog/Dialog.cs
index 0b949b40..eb527cfd 100644
--- a/src/Shared/HandyControl_Shared/Controls/Dialog/Dialog.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Dialog/Dialog.cs
@@ -19,7 +19,7 @@ public class Dialog : ContentControl
private static readonly Dictionary ContainerDic = new();
public static readonly DependencyProperty IsClosedProperty = DependencyProperty.Register(
- "IsClosed", typeof(bool), typeof(Dialog), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsClosed), typeof(bool), typeof(Dialog), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsClosed
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs b/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs
index ed3834a4..eb973b3e 100644
--- a/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs
@@ -98,7 +98,7 @@ public class Drawer : FrameworkElement
}
public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register(
- "IsOpen", typeof(bool), typeof(Drawer), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsOpenChanged));
+ nameof(IsOpen), typeof(bool), typeof(Drawer), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsOpenChanged));
private static void OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -113,7 +113,7 @@ public class Drawer : FrameworkElement
}
public static readonly DependencyProperty MaskCanCloseProperty = DependencyProperty.Register(
- "MaskCanClose", typeof(bool), typeof(Drawer), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(MaskCanClose), typeof(bool), typeof(Drawer), new PropertyMetadata(ValueBoxes.TrueBox));
public bool MaskCanClose
{
@@ -122,7 +122,7 @@ public class Drawer : FrameworkElement
}
public static readonly DependencyProperty ShowMaskProperty = DependencyProperty.Register(
- "ShowMask", typeof(bool), typeof(Drawer), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowMask), typeof(bool), typeof(Drawer), new PropertyMetadata(ValueBoxes.TrueBox));
public bool ShowMask
{
@@ -131,7 +131,7 @@ public class Drawer : FrameworkElement
}
public static readonly DependencyProperty DockProperty = DependencyProperty.Register(
- "Dock", typeof(Dock), typeof(Drawer), new PropertyMetadata(default(Dock)));
+ nameof(Dock), typeof(Dock), typeof(Drawer), new PropertyMetadata(default(Dock)));
public Dock Dock
{
@@ -140,7 +140,7 @@ public class Drawer : FrameworkElement
}
public static readonly DependencyProperty ShowModeProperty = DependencyProperty.Register(
- "ShowMode", typeof(DrawerShowMode), typeof(Drawer), new PropertyMetadata(default(DrawerShowMode)));
+ nameof(ShowMode), typeof(DrawerShowMode), typeof(Drawer), new PropertyMetadata(default(DrawerShowMode)));
public DrawerShowMode ShowMode
{
@@ -149,7 +149,7 @@ public class Drawer : FrameworkElement
}
public static readonly DependencyProperty MaskBrushProperty = DependencyProperty.Register(
- "MaskBrush", typeof(Brush), typeof(Drawer), new PropertyMetadata(default(Brush)));
+ nameof(MaskBrush), typeof(Brush), typeof(Drawer), new PropertyMetadata(default(Brush)));
public Brush MaskBrush
{
@@ -158,7 +158,7 @@ public class Drawer : FrameworkElement
}
public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(
- "Content", typeof(object), typeof(Drawer), new PropertyMetadata(default(object)));
+ nameof(Content), typeof(object), typeof(Drawer), new PropertyMetadata(default(object)));
public object Content
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs b/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs
index e4298e7d..f0f22f3a 100644
--- a/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs
@@ -40,23 +40,23 @@ public class Growl : Control
"ShowMode", typeof(GrowlShowMode), typeof(Growl),
new FrameworkPropertyMetadata(default(GrowlShowMode), FrameworkPropertyMetadataOptions.Inherits));
public static readonly DependencyProperty ShowDateTimeProperty = DependencyProperty.Register(
- "ShowDateTime", typeof(bool), typeof(Growl), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowDateTime), typeof(bool), typeof(Growl), new PropertyMetadata(ValueBoxes.TrueBox));
public static readonly DependencyProperty MessageProperty = DependencyProperty.Register(
- "Message", typeof(string), typeof(Growl), new PropertyMetadata(default(string)));
+ nameof(Message), typeof(string), typeof(Growl), new PropertyMetadata(default(string)));
public static readonly DependencyProperty TimeProperty = DependencyProperty.Register(
- "Time", typeof(DateTime), typeof(Growl), new PropertyMetadata(default(DateTime)));
+ nameof(Time), typeof(DateTime), typeof(Growl), new PropertyMetadata(default(DateTime)));
public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
- "Icon", typeof(Geometry), typeof(Growl), new PropertyMetadata(default(Geometry)));
+ nameof(Icon), typeof(Geometry), typeof(Growl), new PropertyMetadata(default(Geometry)));
public static readonly DependencyProperty IconBrushProperty = DependencyProperty.Register(
- "IconBrush", typeof(Brush), typeof(Growl), new PropertyMetadata(default(Brush)));
+ nameof(IconBrush), typeof(Brush), typeof(Growl), new PropertyMetadata(default(Brush)));
public static readonly DependencyProperty TypeProperty = DependencyProperty.Register(
- "Type", typeof(InfoType), typeof(Growl), new PropertyMetadata(default(InfoType)));
+ nameof(Type), typeof(InfoType), typeof(Growl), new PropertyMetadata(default(InfoType)));
public static readonly DependencyProperty TokenProperty = DependencyProperty.RegisterAttached(
"Token", typeof(string), typeof(Growl), new PropertyMetadata(default(string), OnTokenChanged));
internal static readonly DependencyProperty CancelStrProperty = DependencyProperty.Register(
- "CancelStr", typeof(string), typeof(Growl), new PropertyMetadata(default(string)));
+ nameof(CancelStr), typeof(string), typeof(Growl), new PropertyMetadata(default(string)));
internal static readonly DependencyProperty ConfirmStrProperty = DependencyProperty.Register(
- "ConfirmStr", typeof(string), typeof(Growl), new PropertyMetadata(default(string)));
+ nameof(ConfirmStr), typeof(string), typeof(Growl), new PropertyMetadata(default(string)));
private static readonly DependencyProperty IsCreatedAutomaticallyProperty = DependencyProperty.RegisterAttached(
"IsCreatedAutomatically", typeof(bool), typeof(Growl), new PropertyMetadata(ValueBoxes.FalseBox));
private static GrowlWindow GrowlWindow;
diff --git a/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs b/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs
index 63c9829d..482d6a68 100644
--- a/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Image/GifImage.cs
@@ -37,7 +37,7 @@ public class GifImage : Image, IDisposable
}
public static readonly DependencyProperty UriProperty = DependencyProperty.Register(
- "Uri", typeof(Uri), typeof(GifImage), new PropertyMetadata(default(Uri), OnUriChanged));
+ nameof(Uri), typeof(Uri), typeof(GifImage), new PropertyMetadata(default(Uri), OnUriChanged));
private static void OnUriChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Image/ImageBlock.cs b/src/Shared/HandyControl_Shared/Controls/Image/ImageBlock.cs
index 6b6f469b..22e55c1e 100644
--- a/src/Shared/HandyControl_Shared/Controls/Image/ImageBlock.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Image/ImageBlock.cs
@@ -93,7 +93,7 @@ public class ImageBlock : FrameworkElement
private void DispatcherTimer_Tick(object sender, EventArgs e) => InvalidateVisual();
public static readonly DependencyProperty StartColumnProperty = DependencyProperty.Register(
- "StartColumn", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
+ nameof(StartColumn), typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged));
public int StartColumn
@@ -103,7 +103,7 @@ public class ImageBlock : FrameworkElement
}
public static readonly DependencyProperty StartRowProperty = DependencyProperty.Register(
- "StartRow", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
+ nameof(StartRow), typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged));
public int StartRow
@@ -113,7 +113,7 @@ public class ImageBlock : FrameworkElement
}
public static readonly DependencyProperty EndColumnProperty = DependencyProperty.Register(
- "EndColumn", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
+ nameof(EndColumn), typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged));
public int EndColumn
@@ -123,7 +123,7 @@ public class ImageBlock : FrameworkElement
}
public static readonly DependencyProperty EndRowProperty = DependencyProperty.Register(
- "EndRow", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
+ nameof(EndRow), typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged));
public int EndRow
@@ -133,7 +133,7 @@ public class ImageBlock : FrameworkElement
}
public static readonly DependencyProperty IsPlayingProperty = DependencyProperty.Register(
- "IsPlaying", typeof(bool), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.FalseBox,
+ nameof(IsPlaying), typeof(bool), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.FalseBox,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnIsPlayingChanged));
private static void OnIsPlayingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
@@ -156,7 +156,7 @@ public class ImageBlock : FrameworkElement
}
public static readonly DependencyProperty ColumnsProperty = DependencyProperty.Register(
- "Columns", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int1Box,
+ nameof(Columns), typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int1Box,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged), obj => (int) obj >= 1);
public int Columns
@@ -166,7 +166,7 @@ public class ImageBlock : FrameworkElement
}
public static readonly DependencyProperty RowsProperty = DependencyProperty.Register(
- "Rows", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int1Box,
+ nameof(Rows), typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int1Box,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged), obj => (int) obj >= 1);
public int Rows
@@ -176,7 +176,7 @@ public class ImageBlock : FrameworkElement
}
public static readonly DependencyProperty IntervalProperty = DependencyProperty.Register(
- "Interval", typeof(TimeSpan), typeof(ImageBlock), new PropertyMetadata(TimeSpan.FromSeconds(1), OnIntervalChanged));
+ nameof(Interval), typeof(TimeSpan), typeof(ImageBlock), new PropertyMetadata(TimeSpan.FromSeconds(1), OnIntervalChanged));
private static void OnIntervalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -191,7 +191,7 @@ public class ImageBlock : FrameworkElement
}
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
- "Source", typeof(ImageSource), typeof(ImageBlock), new FrameworkPropertyMetadata(default(ImageSource),
+ nameof(Source), typeof(ImageSource), typeof(ImageBlock), new FrameworkPropertyMetadata(default(ImageSource),
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnSourceChanged));
private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
diff --git a/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs b/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs
index 5795131d..8632a3a7 100644
--- a/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs
@@ -218,10 +218,10 @@ public class ImageViewer : Control
#region Properties
public static readonly DependencyProperty ShowImgMapProperty = DependencyProperty.Register(
- "ShowImgMap", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowImgMap), typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register(
- "ImageSource", typeof(BitmapFrame), typeof(ImageViewer), new PropertyMetadata(default(BitmapFrame), OnImageSourceChanged));
+ nameof(ImageSource), typeof(BitmapFrame), typeof(ImageViewer), new PropertyMetadata(default(BitmapFrame), OnImageSourceChanged));
private static void OnImageSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -230,52 +230,52 @@ public class ImageViewer : Control
}
public static readonly DependencyProperty ShowToolBarProperty = DependencyProperty.Register(
- "ShowToolBar", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowToolBar), typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.TrueBox));
public static readonly DependencyProperty IsFullScreenProperty = DependencyProperty.Register(
- "IsFullScreen", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsFullScreen), typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
internal static readonly DependencyProperty ImgPathProperty = DependencyProperty.Register(
- "ImgPath", typeof(string), typeof(ImageViewer), new PropertyMetadata(default(string)));
+ nameof(ImgPath), typeof(string), typeof(ImageViewer), new PropertyMetadata(default(string)));
internal static readonly DependencyProperty ImgSizeProperty = DependencyProperty.Register(
- "ImgSize", typeof(long), typeof(ImageViewer), new PropertyMetadata(-1L));
+ nameof(ImgSize), typeof(long), typeof(ImageViewer), new PropertyMetadata(-1L));
///
/// 是否显示全屏按钮
///
internal static readonly DependencyProperty ShowFullScreenButtonProperty = DependencyProperty.Register(
- "ShowFullScreenButton", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowFullScreenButton), typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 关闭按钮是否显示中
///
internal static readonly DependencyProperty ShowCloseButtonProperty = DependencyProperty.Register(
- "ShowCloseButton", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowCloseButton), typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
internal static readonly DependencyProperty ImageContentProperty = DependencyProperty.Register(
- "ImageContent", typeof(object), typeof(ImageViewer), new PropertyMetadata(default(object)));
+ nameof(ImageContent), typeof(object), typeof(ImageViewer), new PropertyMetadata(default(object)));
internal static readonly DependencyProperty ImageMarginProperty = DependencyProperty.Register(
- "ImageMargin", typeof(Thickness), typeof(ImageViewer), new PropertyMetadata(default(Thickness)));
+ nameof(ImageMargin), typeof(Thickness), typeof(ImageViewer), new PropertyMetadata(default(Thickness)));
internal static readonly DependencyProperty ImageWidthProperty = DependencyProperty.Register(
- "ImageWidth", typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(ImageWidth), typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double0Box));
internal static readonly DependencyProperty ImageHeightProperty = DependencyProperty.Register(
- "ImageHeight", typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(ImageHeight), typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double0Box));
internal static readonly DependencyProperty ImageScaleProperty = DependencyProperty.Register(
- "ImageScale", typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double1Box, OnImageScaleChanged));
+ nameof(ImageScale), typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double1Box, OnImageScaleChanged));
internal static readonly DependencyProperty ScaleStrProperty = DependencyProperty.Register(
- "ScaleStr", typeof(string), typeof(ImageViewer), new PropertyMetadata("100%"));
+ nameof(ScaleStr), typeof(string), typeof(ImageViewer), new PropertyMetadata("100%"));
internal static readonly DependencyProperty ImageRotateProperty = DependencyProperty.Register(
- "ImageRotate", typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(ImageRotate), typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double0Box));
internal static readonly DependencyProperty ShowSmallImgInternalProperty = DependencyProperty.Register(
- "ShowSmallImgInternal", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowSmallImgInternal), typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsFullScreen
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
index 7a484da2..1d889068 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
@@ -25,7 +25,7 @@ public class CheckComboBox : ListBox, IDataInput
private bool _isInternalAction;
public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- "IsError", typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsError), typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsError
{
@@ -34,7 +34,7 @@ public class CheckComboBox : ListBox, IDataInput
}
public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- "ErrorStr", typeof(string), typeof(CheckComboBox), new PropertyMetadata(default(string)));
+ nameof(ErrorStr), typeof(string), typeof(CheckComboBox), new PropertyMetadata(default(string)));
public string ErrorStr
{
@@ -43,7 +43,7 @@ public class CheckComboBox : ListBox, IDataInput
}
public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
- "TextType", typeof(TextType), typeof(CheckComboBox), new PropertyMetadata(default(TextType)));
+ nameof(TextType), typeof(TextType), typeof(CheckComboBox), new PropertyMetadata(default(TextType)));
public TextType TextType
{
@@ -52,7 +52,7 @@ public class CheckComboBox : ListBox, IDataInput
}
public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- "ShowClearButton", typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowClearButton), typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowClearButton
{
@@ -73,7 +73,7 @@ public class CheckComboBox : ListBox, IDataInput
}
public static readonly DependencyProperty IsDropDownOpenProperty = DependencyProperty.Register(
- "IsDropDownOpen", typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox, OnIsDropDownOpenChanged));
+ nameof(IsDropDownOpen), typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox, OnIsDropDownOpenChanged));
private static void OnIsDropDownOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -95,7 +95,7 @@ public class CheckComboBox : ListBox, IDataInput
}
public static readonly DependencyProperty TagStyleProperty = DependencyProperty.Register(
- "TagStyle", typeof(Style), typeof(CheckComboBox), new PropertyMetadata(default(Style)));
+ nameof(TagStyle), typeof(Style), typeof(CheckComboBox), new PropertyMetadata(default(Style)));
public Style TagStyle
{
@@ -104,7 +104,7 @@ public class CheckComboBox : ListBox, IDataInput
}
public static readonly DependencyProperty ShowSelectAllButtonProperty = DependencyProperty.Register(
- "ShowSelectAllButton", typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowSelectAllButton), typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowSelectAllButton
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
index ebfc4410..812bbe71 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
@@ -169,7 +169,7 @@ public class ComboBox : System.Windows.Controls.ComboBox, IDataInput
/// 数据是否错误
///
public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- "IsError", typeof(bool), typeof(ComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsError), typeof(bool), typeof(ComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 数据是否错误
@@ -184,7 +184,7 @@ public class ComboBox : System.Windows.Controls.ComboBox, IDataInput
/// 错误提示
///
public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- "ErrorStr", typeof(string), typeof(ComboBox), new PropertyMetadata(default(string)));
+ nameof(ErrorStr), typeof(string), typeof(ComboBox), new PropertyMetadata(default(string)));
///
/// 错误提示
@@ -220,7 +220,7 @@ public class ComboBox : System.Windows.Controls.ComboBox, IDataInput
/// 是否显示清除按钮
///
public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- "ShowClearButton", typeof(bool), typeof(ComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowClearButton), typeof(bool), typeof(ComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否显示清除按钮
@@ -235,7 +235,7 @@ public class ComboBox : System.Windows.Controls.ComboBox, IDataInput
/// 是否自动完成输入
///
public static readonly DependencyProperty AutoCompleteProperty = DependencyProperty.Register(
- "AutoComplete", typeof(bool), typeof(ComboBox), new PropertyMetadata(ValueBoxes.FalseBox, OnAutoCompleteChanged));
+ nameof(AutoComplete), typeof(bool), typeof(ComboBox), new PropertyMetadata(ValueBoxes.FalseBox, OnAutoCompleteChanged));
private static void OnAutoCompleteChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -259,7 +259,7 @@ public class ComboBox : System.Windows.Controls.ComboBox, IDataInput
/// 搜索文本
///
internal static readonly DependencyProperty SearchTextProperty = DependencyProperty.Register(
- "SearchText", typeof(string), typeof(ComboBox), new PropertyMetadata(default(string), OnSearchTextChanged));
+ nameof(SearchText), typeof(string), typeof(ComboBox), new PropertyMetadata(default(string), OnSearchTextChanged));
private static void OnSearchTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs
index f1077bea..2fb487ff 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs
@@ -54,7 +54,7 @@ public class DatePicker : System.Windows.Controls.DatePicker, IDataInput
public Func> VerifyFunc { get; set; }
public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- "IsError", typeof(bool), typeof(DatePicker), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsError), typeof(bool), typeof(DatePicker), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsError
{
@@ -63,7 +63,7 @@ public class DatePicker : System.Windows.Controls.DatePicker, IDataInput
}
public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- "ErrorStr", typeof(string), typeof(DatePicker), new PropertyMetadata(default(string)));
+ nameof(ErrorStr), typeof(string), typeof(DatePicker), new PropertyMetadata(default(string)));
public string ErrorStr
{
@@ -72,7 +72,7 @@ public class DatePicker : System.Windows.Controls.DatePicker, IDataInput
}
public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
- "TextType", typeof(TextType), typeof(DatePicker), new PropertyMetadata(default(TextType)));
+ nameof(TextType), typeof(TextType), typeof(DatePicker), new PropertyMetadata(default(TextType)));
public TextType TextType
{
@@ -81,7 +81,7 @@ public class DatePicker : System.Windows.Controls.DatePicker, IDataInput
}
public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- "ShowClearButton", typeof(bool), typeof(DatePicker), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowClearButton), typeof(bool), typeof(DatePicker), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowClearButton
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs
index 878c317c..e2d3082c 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs
@@ -93,7 +93,7 @@ public class DateTimePicker : Control, IDataInput
#region Public Properties
public static readonly DependencyProperty DateTimeFormatProperty = DependencyProperty.Register(
- "DateTimeFormat", typeof(string), typeof(DateTimePicker), new PropertyMetadata("yyyy-MM-dd HH:mm:ss"));
+ nameof(DateTimeFormat), typeof(string), typeof(DateTimePicker), new PropertyMetadata("yyyy-MM-dd HH:mm:ss"));
public string DateTimeFormat
{
@@ -102,7 +102,7 @@ public class DateTimePicker : Control, IDataInput
}
public static readonly DependencyProperty CalendarStyleProperty = DependencyProperty.Register(
- "CalendarStyle", typeof(Style), typeof(DateTimePicker), new PropertyMetadata(default(Style)));
+ nameof(CalendarStyle), typeof(Style), typeof(DateTimePicker), new PropertyMetadata(default(Style)));
public Style CalendarStyle
{
@@ -111,7 +111,7 @@ public class DateTimePicker : Control, IDataInput
}
public static readonly DependencyProperty DisplayDateTimeProperty = DependencyProperty.Register(
- "DisplayDateTime", typeof(DateTime), typeof(DateTimePicker), new FrameworkPropertyMetadata(DateTime.Now, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, null, CoerceDisplayDateTime));
+ nameof(DisplayDateTime), typeof(DateTime), typeof(DateTimePicker), new FrameworkPropertyMetadata(DateTime.Now, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, null, CoerceDisplayDateTime));
private static object CoerceDisplayDateTime(DependencyObject d, object value)
{
@@ -128,7 +128,7 @@ public class DateTimePicker : Control, IDataInput
}
public static readonly DependencyProperty IsDropDownOpenProperty = DependencyProperty.Register(
- "IsDropDownOpen", typeof(bool), typeof(DateTimePicker), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsDropDownOpenChanged, OnCoerceIsDropDownOpen));
+ nameof(IsDropDownOpen), typeof(bool), typeof(DateTimePicker), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsDropDownOpenChanged, OnCoerceIsDropDownOpen));
private static object OnCoerceIsDropDownOpen(DependencyObject d, object baseValue) =>
d is DateTimePicker
@@ -165,7 +165,7 @@ public class DateTimePicker : Control, IDataInput
}
public static readonly DependencyProperty SelectedDateTimeProperty = DependencyProperty.Register(
- "SelectedDateTime", typeof(DateTime?), typeof(DateTimePicker), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedDateTimeChanged, CoerceSelectedDateTime));
+ nameof(SelectedDateTime), typeof(DateTime?), typeof(DateTimePicker), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedDateTimeChanged, CoerceSelectedDateTime));
private static object CoerceSelectedDateTime(DependencyObject d, object value)
{
@@ -197,7 +197,7 @@ public class DateTimePicker : Control, IDataInput
}
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
- "Text", typeof(string), typeof(DateTimePicker), new FrameworkPropertyMetadata(string.Empty, OnTextChanged));
+ nameof(Text), typeof(string), typeof(DateTimePicker), new FrameworkPropertyMetadata(string.Empty, OnTextChanged));
private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -241,7 +241,7 @@ public class DateTimePicker : Control, IDataInput
public Func> VerifyFunc { get; set; }
public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- "IsError", typeof(bool), typeof(DateTimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsError), typeof(bool), typeof(DateTimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsError
{
@@ -250,7 +250,7 @@ public class DateTimePicker : Control, IDataInput
}
public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- "ErrorStr", typeof(string), typeof(DateTimePicker), new PropertyMetadata(default(string)));
+ nameof(ErrorStr), typeof(string), typeof(DateTimePicker), new PropertyMetadata(default(string)));
public string ErrorStr
{
@@ -259,7 +259,7 @@ public class DateTimePicker : Control, IDataInput
}
public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
- "TextType", typeof(TextType), typeof(DateTimePicker), new PropertyMetadata(default(TextType)));
+ nameof(TextType), typeof(TextType), typeof(DateTimePicker), new PropertyMetadata(default(TextType)));
public TextType TextType
{
@@ -268,7 +268,7 @@ public class DateTimePicker : Control, IDataInput
}
public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- "ShowClearButton", typeof(bool), typeof(DateTimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowClearButton), typeof(bool), typeof(DateTimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowClearButton
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/ImageSelector.cs b/src/Shared/HandyControl_Shared/Controls/Input/ImageSelector.cs
index 5c5eaccf..18e814e2 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/ImageSelector.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/ImageSelector.cs
@@ -68,7 +68,7 @@ public class ImageSelector : Control
}
public static readonly DependencyProperty StretchProperty = DependencyProperty.Register(
- "Stretch", typeof(Stretch), typeof(ImageSelector), new PropertyMetadata(default(Stretch)));
+ nameof(Stretch), typeof(Stretch), typeof(ImageSelector), new PropertyMetadata(default(Stretch)));
public Stretch Stretch
{
@@ -99,7 +99,7 @@ public class ImageSelector : Control
}
public static readonly DependencyProperty StrokeThicknessProperty = DependencyProperty.Register(
- "StrokeThickness", typeof(double), typeof(ImageSelector), new FrameworkPropertyMetadata(ValueBoxes.Double1Box, FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(StrokeThickness), typeof(double), typeof(ImageSelector), new FrameworkPropertyMetadata(ValueBoxes.Double1Box, FrameworkPropertyMetadataOptions.AffectsRender));
public double StrokeThickness
{
@@ -108,7 +108,7 @@ public class ImageSelector : Control
}
public static readonly DependencyProperty StrokeDashArrayProperty = DependencyProperty.Register(
- "StrokeDashArray", typeof(DoubleCollection), typeof(ImageSelector), new FrameworkPropertyMetadata(default(DoubleCollection), FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(StrokeDashArray), typeof(DoubleCollection), typeof(ImageSelector), new FrameworkPropertyMetadata(default(DoubleCollection), FrameworkPropertyMetadataOptions.AffectsRender));
public DoubleCollection StrokeDashArray
{
@@ -117,7 +117,7 @@ public class ImageSelector : Control
}
public static readonly DependencyProperty DefaultExtProperty = DependencyProperty.Register(
- "DefaultExt", typeof(string), typeof(ImageSelector), new PropertyMetadata(".jpg"));
+ nameof(DefaultExt), typeof(string), typeof(ImageSelector), new PropertyMetadata(".jpg"));
public string DefaultExt
{
@@ -126,7 +126,7 @@ public class ImageSelector : Control
}
public static readonly DependencyProperty FilterProperty = DependencyProperty.Register(
- "Filter", typeof(string), typeof(ImageSelector), new PropertyMetadata("(.jpg)|*.jpg|(.png)|*.png"));
+ nameof(Filter), typeof(string), typeof(ImageSelector), new PropertyMetadata("(.jpg)|*.jpg|(.png)|*.png"));
public string Filter
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
index 9c878bb7..b9c535dc 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
@@ -147,7 +147,7 @@ public class NumericUpDown : Control
/// 当前值
///
public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
- "Value", typeof(double), typeof(NumericUpDown),
+ nameof(Value), typeof(double), typeof(NumericUpDown),
new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
OnValueChanged, CoerceValue), ValidateHelper.IsInRangeOfDouble);
@@ -204,7 +204,7 @@ public class NumericUpDown : Control
/// 最大值
///
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
- "Maximum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(double.MaxValue, OnMaximumChanged, CoerceMaximum), ValidateHelper.IsInRangeOfDouble);
+ nameof(Maximum), typeof(double), typeof(NumericUpDown), new PropertyMetadata(double.MaxValue, OnMaximumChanged, CoerceMaximum), ValidateHelper.IsInRangeOfDouble);
private static void OnMaximumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -232,7 +232,7 @@ public class NumericUpDown : Control
/// 最小值
///
public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register(
- "Minimum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(double.MinValue, OnMinimumChanged, CoerceMinimum), ValidateHelper.IsInRangeOfDouble);
+ nameof(Minimum), typeof(double), typeof(NumericUpDown), new PropertyMetadata(double.MinValue, OnMinimumChanged, CoerceMinimum), ValidateHelper.IsInRangeOfDouble);
private static void OnMinimumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -260,7 +260,7 @@ public class NumericUpDown : Control
/// 指示每单击一下按钮时增加或减少的数量
///
public static readonly DependencyProperty IncrementProperty = DependencyProperty.Register(
- "Increment", typeof(double), typeof(NumericUpDown), new PropertyMetadata(ValueBoxes.Double1Box));
+ nameof(Increment), typeof(double), typeof(NumericUpDown), new PropertyMetadata(ValueBoxes.Double1Box));
///
/// 指示每单击一下按钮时增加或减少的数量
@@ -275,7 +275,7 @@ public class NumericUpDown : Control
/// 指示要显示的小数位数
///
public static readonly DependencyProperty DecimalPlacesProperty = DependencyProperty.Register(
- "DecimalPlaces", typeof(int?), typeof(NumericUpDown), new PropertyMetadata(default(int?)));
+ nameof(DecimalPlaces), typeof(int?), typeof(NumericUpDown), new PropertyMetadata(default(int?)));
///
/// 指示要显示的小数位数
@@ -290,7 +290,7 @@ public class NumericUpDown : Control
/// 指示要显示的数字的格式
///
public static readonly DependencyProperty ValueFormatProperty = DependencyProperty.Register(
- "ValueFormat", typeof(string), typeof(NumericUpDown), new PropertyMetadata(default(string)));
+ nameof(ValueFormat), typeof(string), typeof(NumericUpDown), new PropertyMetadata(default(string)));
///
/// 指示要显示的数字的格式,这将会覆盖 属性
@@ -305,7 +305,7 @@ public class NumericUpDown : Control
/// 是否显示上下调值按钮
///
internal static readonly DependencyProperty ShowUpDownButtonProperty = DependencyProperty.Register(
- "ShowUpDownButton", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowUpDownButton), typeof(bool), typeof(NumericUpDown), new PropertyMetadata(ValueBoxes.TrueBox));
///
/// 是否显示上下调值按钮
@@ -320,7 +320,7 @@ public class NumericUpDown : Control
/// 标识 IsReadOnly 依赖属性。
///
public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register(
- "IsReadOnly", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsReadOnly), typeof(bool), typeof(NumericUpDown), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 获取或设置一个值,该值指示NumericUpDown是否只读。
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs
index 0794949b..6845310a 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs
@@ -43,7 +43,7 @@ public class PasswordBox : Control, IDataInput
/// 数据是否错误
///
public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- "IsError", typeof(bool), typeof(PasswordBox), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsError), typeof(bool), typeof(PasswordBox), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsError
{
@@ -55,7 +55,7 @@ public class PasswordBox : Control, IDataInput
/// 错误提示
///
public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- "ErrorStr", typeof(string), typeof(PasswordBox), new PropertyMetadata(default(string)));
+ nameof(ErrorStr), typeof(string), typeof(PasswordBox), new PropertyMetadata(default(string)));
public string ErrorStr
{
@@ -67,7 +67,7 @@ public class PasswordBox : Control, IDataInput
/// 文本类型
///
public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
- "TextType", typeof(TextType), typeof(PasswordBox), new PropertyMetadata(default(TextType)));
+ nameof(TextType), typeof(TextType), typeof(PasswordBox), new PropertyMetadata(default(TextType)));
public TextType TextType
{
@@ -79,7 +79,7 @@ public class PasswordBox : Control, IDataInput
/// 是否显示清除按钮
///
public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- "ShowClearButton", typeof(bool), typeof(PasswordBox), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowClearButton), typeof(bool), typeof(PasswordBox), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowClearButton
{
@@ -88,7 +88,7 @@ public class PasswordBox : Control, IDataInput
}
public static readonly DependencyProperty ShowEyeButtonProperty = DependencyProperty.Register(
- "ShowEyeButton", typeof(bool), typeof(PasswordBox), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowEyeButton), typeof(bool), typeof(PasswordBox), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowEyeButton
{
@@ -97,7 +97,7 @@ public class PasswordBox : Control, IDataInput
}
public static readonly DependencyProperty ShowPasswordProperty = DependencyProperty.Register(
- "ShowPassword", typeof(bool), typeof(PasswordBox),
+ nameof(ShowPassword), typeof(bool), typeof(PasswordBox),
new PropertyMetadata(ValueBoxes.FalseBox, OnShowPasswordChanged));
public bool ShowPassword
@@ -107,7 +107,7 @@ public class PasswordBox : Control, IDataInput
}
public static readonly DependencyProperty IsSafeEnabledProperty = DependencyProperty.Register(
- "IsSafeEnabled", typeof(bool), typeof(PasswordBox), new PropertyMetadata(ValueBoxes.TrueBox, OnIsSafeEnabledChanged));
+ nameof(IsSafeEnabled), typeof(bool), typeof(PasswordBox), new PropertyMetadata(ValueBoxes.TrueBox, OnIsSafeEnabledChanged));
private static void OnIsSafeEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -122,7 +122,7 @@ public class PasswordBox : Control, IDataInput
}
public static readonly DependencyProperty UnsafePasswordProperty = DependencyProperty.Register(
- "UnsafePassword", typeof(string), typeof(PasswordBox), new FrameworkPropertyMetadata(default(string),
+ nameof(UnsafePassword), typeof(string), typeof(PasswordBox), new FrameworkPropertyMetadata(default(string),
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnUnsafePasswordChanged));
private static void OnUnsafePasswordChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/PinBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/PinBox.cs
index 87a69f52..39d87977 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/PinBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/PinBox.cs
@@ -262,7 +262,7 @@ public class PinBox : Control
}
public static readonly DependencyProperty LengthProperty = DependencyProperty.Register(
- "Length", typeof(int), typeof(PinBox), new PropertyMetadata(MinLength, OnLengthChanged, CoerceLength), ValidateHelper.IsInRangeOfPosInt);
+ nameof(Length), typeof(int), typeof(PinBox), new PropertyMetadata(MinLength, OnLengthChanged, CoerceLength), ValidateHelper.IsInRangeOfPosInt);
private static void OnLengthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -279,7 +279,7 @@ public class PinBox : Control
}
public static readonly DependencyProperty ItemMarginProperty = DependencyProperty.Register(
- "ItemMargin", typeof(Thickness), typeof(PinBox), new PropertyMetadata(default(Thickness)));
+ nameof(ItemMargin), typeof(Thickness), typeof(PinBox), new PropertyMetadata(default(Thickness)));
public Thickness ItemMargin
{
@@ -288,7 +288,7 @@ public class PinBox : Control
}
public static readonly DependencyProperty ItemWidthProperty = DependencyProperty.Register(
- "ItemWidth", typeof(double), typeof(PinBox), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(ItemWidth), typeof(double), typeof(PinBox), new PropertyMetadata(ValueBoxes.Double0Box));
public double ItemWidth
{
@@ -297,7 +297,7 @@ public class PinBox : Control
}
public static readonly DependencyProperty ItemHeightProperty = DependencyProperty.Register(
- "ItemHeight", typeof(double), typeof(PinBox), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(ItemHeight), typeof(double), typeof(PinBox), new PropertyMetadata(ValueBoxes.Double0Box));
public double ItemHeight
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/SearchBar.cs b/src/Shared/HandyControl_Shared/Controls/Input/SearchBar.cs
index cda2231f..b5683013 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/SearchBar.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/SearchBar.cs
@@ -68,7 +68,7 @@ public class SearchBar : TextBox, ICommandSource
/// 是否实时搜索
///
public static readonly DependencyProperty IsRealTimeProperty = DependencyProperty.Register(
- "IsRealTime", typeof(bool), typeof(SearchBar), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsRealTime), typeof(bool), typeof(SearchBar), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否实时搜索
@@ -80,7 +80,7 @@ public class SearchBar : TextBox, ICommandSource
}
public static readonly DependencyProperty CommandProperty = DependencyProperty.Register(
- "Command", typeof(ICommand), typeof(SearchBar), new PropertyMetadata(default(ICommand), OnCommandChanged));
+ nameof(Command), typeof(ICommand), typeof(SearchBar), new PropertyMetadata(default(ICommand), OnCommandChanged));
private static void OnCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -102,7 +102,7 @@ public class SearchBar : TextBox, ICommandSource
}
public static readonly DependencyProperty CommandParameterProperty = DependencyProperty.Register(
- "CommandParameter", typeof(object), typeof(SearchBar), new PropertyMetadata(default(object)));
+ nameof(CommandParameter), typeof(object), typeof(SearchBar), new PropertyMetadata(default(object)));
public object CommandParameter
{
@@ -111,7 +111,7 @@ public class SearchBar : TextBox, ICommandSource
}
public static readonly DependencyProperty CommandTargetProperty = DependencyProperty.Register(
- "CommandTarget", typeof(IInputElement), typeof(SearchBar), new PropertyMetadata(default(IInputElement)));
+ nameof(CommandTarget), typeof(IInputElement), typeof(SearchBar), new PropertyMetadata(default(IInputElement)));
public IInputElement CommandTarget
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs
index 2c144eb6..638f9a91 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs
@@ -93,7 +93,7 @@ public class TimePicker : Control, IDataInput
#region TimeFormat
public static readonly DependencyProperty TimeFormatProperty = DependencyProperty.Register(
- "TimeFormat", typeof(string), typeof(TimePicker), new PropertyMetadata("HH:mm:ss"));
+ nameof(TimeFormat), typeof(string), typeof(TimePicker), new PropertyMetadata("HH:mm:ss"));
public string TimeFormat
{
@@ -113,7 +113,7 @@ public class TimePicker : Control, IDataInput
public static readonly DependencyProperty DisplayTimeProperty =
DependencyProperty.Register(
- "DisplayTime",
+ nameof(DisplayTime),
typeof(DateTime),
typeof(TimePicker),
new FrameworkPropertyMetadata(DateTime.Now, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, null, CoerceDisplayTime));
@@ -137,7 +137,7 @@ public class TimePicker : Control, IDataInput
public static readonly DependencyProperty IsDropDownOpenProperty =
DependencyProperty.Register(
- "IsDropDownOpen",
+ nameof(IsDropDownOpen),
typeof(bool),
typeof(TimePicker),
new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsDropDownOpenChanged, OnCoerceIsDropDownOpen));
@@ -182,7 +182,7 @@ public class TimePicker : Control, IDataInput
public static readonly DependencyProperty SelectedTimeProperty =
DependencyProperty.Register(
- "SelectedTime",
+ nameof(SelectedTime),
typeof(DateTime?),
typeof(TimePicker),
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedTimeChanged, CoerceSelectedTime));
@@ -222,7 +222,7 @@ public class TimePicker : Control, IDataInput
public static readonly DependencyProperty TextProperty =
DependencyProperty.Register(
- "Text",
+ nameof(Text),
typeof(string),
typeof(TimePicker),
new FrameworkPropertyMetadata(string.Empty, OnTextChanged));
@@ -265,7 +265,7 @@ public class TimePicker : Control, IDataInput
public Func> VerifyFunc { get; set; }
public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- "IsError", typeof(bool), typeof(TimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsError), typeof(bool), typeof(TimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsError
{
@@ -274,7 +274,7 @@ public class TimePicker : Control, IDataInput
}
public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- "ErrorStr", typeof(string), typeof(TimePicker), new PropertyMetadata(default(string)));
+ nameof(ErrorStr), typeof(string), typeof(TimePicker), new PropertyMetadata(default(string)));
public string ErrorStr
{
@@ -283,7 +283,7 @@ public class TimePicker : Control, IDataInput
}
public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
- "TextType", typeof(TextType), typeof(TimePicker), new PropertyMetadata(default(TextType)));
+ nameof(TextType), typeof(TextType), typeof(TimePicker), new PropertyMetadata(default(TextType)));
public TextType TextType
{
@@ -292,7 +292,7 @@ public class TimePicker : Control, IDataInput
}
public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- "ShowClearButton", typeof(bool), typeof(TimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowClearButton), typeof(bool), typeof(TimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowClearButton
{
@@ -341,7 +341,7 @@ public class TimePicker : Control, IDataInput
}
public static readonly DependencyProperty ClockProperty = DependencyProperty.Register(
- "Clock", typeof(ClockBase), typeof(TimePicker), new FrameworkPropertyMetadata(default(Clock), FrameworkPropertyMetadataOptions.NotDataBindable, OnClockChanged));
+ nameof(Clock), typeof(ClockBase), typeof(TimePicker), new FrameworkPropertyMetadata(default(Clock), FrameworkPropertyMetadataOptions.NotDataBindable, OnClockChanged));
private static void OnClockChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/WatermarkTextBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/WatermarkTextBox.cs
index e8e274f6..cb3d59f2 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/WatermarkTextBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/WatermarkTextBox.cs
@@ -9,7 +9,7 @@ public class WatermarkTextBox : TextBox
#region Watermark
public static readonly DependencyProperty WatermarkProperty = DependencyProperty.Register(
- "Watermark", typeof(object), typeof(WatermarkTextBox), new PropertyMetadata(default(object)));
+ nameof(Watermark), typeof(object), typeof(WatermarkTextBox), new PropertyMetadata(default(object)));
public object Watermark
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Loading/LoadingBase.cs b/src/Shared/HandyControl_Shared/Controls/Loading/LoadingBase.cs
index 8b35a4fc..44bec6e0 100644
--- a/src/Shared/HandyControl_Shared/Controls/Loading/LoadingBase.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Loading/LoadingBase.cs
@@ -14,7 +14,7 @@ public abstract class LoadingBase : ContentControl
protected Storyboard Storyboard;
public static readonly DependencyProperty IsRunningProperty = DependencyProperty.Register(
- "IsRunning", typeof(bool), typeof(LoadingBase), new PropertyMetadata(ValueBoxes.TrueBox, (o, args) =>
+ nameof(IsRunning), typeof(bool), typeof(LoadingBase), new PropertyMetadata(ValueBoxes.TrueBox, (o, args) =>
{
var ctl = (LoadingBase) o;
var v = (bool) args.NewValue;
@@ -35,31 +35,31 @@ public abstract class LoadingBase : ContentControl
}
public static readonly DependencyProperty DotCountProperty = DependencyProperty.Register(
- "DotCount", typeof(int), typeof(LoadingBase),
+ nameof(DotCount), typeof(int), typeof(LoadingBase),
new FrameworkPropertyMetadata(ValueBoxes.Int5Box, FrameworkPropertyMetadataOptions.AffectsRender));
public static readonly DependencyProperty DotIntervalProperty = DependencyProperty.Register(
- "DotInterval", typeof(double), typeof(LoadingBase),
+ nameof(DotInterval), typeof(double), typeof(LoadingBase),
new FrameworkPropertyMetadata(ValueBoxes.Double10Box, FrameworkPropertyMetadataOptions.AffectsRender));
public static readonly DependencyProperty DotBorderBrushProperty = DependencyProperty.Register(
- "DotBorderBrush", typeof(Brush), typeof(LoadingBase),
+ nameof(DotBorderBrush), typeof(Brush), typeof(LoadingBase),
new FrameworkPropertyMetadata(default(Brush), FrameworkPropertyMetadataOptions.AffectsRender));
public static readonly DependencyProperty DotBorderThicknessProperty = DependencyProperty.Register(
- "DotBorderThickness", typeof(double), typeof(LoadingBase),
+ nameof(DotBorderThickness), typeof(double), typeof(LoadingBase),
new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.AffectsRender));
public static readonly DependencyProperty DotDiameterProperty = DependencyProperty.Register(
- "DotDiameter", typeof(double), typeof(LoadingBase),
+ nameof(DotDiameter), typeof(double), typeof(LoadingBase),
new FrameworkPropertyMetadata(6.0, FrameworkPropertyMetadataOptions.AffectsRender));
public static readonly DependencyProperty DotSpeedProperty = DependencyProperty.Register(
- "DotSpeed", typeof(double), typeof(LoadingBase),
+ nameof(DotSpeed), typeof(double), typeof(LoadingBase),
new FrameworkPropertyMetadata(4.0, FrameworkPropertyMetadataOptions.AffectsRender));
public static readonly DependencyProperty DotDelayTimeProperty = DependencyProperty.Register(
- "DotDelayTime", typeof(double), typeof(LoadingBase),
+ nameof(DotDelayTime), typeof(double), typeof(LoadingBase),
new FrameworkPropertyMetadata(80.0, FrameworkPropertyMetadataOptions.AffectsRender));
protected readonly Canvas PrivateCanvas = new()
diff --git a/src/Shared/HandyControl_Shared/Controls/Loading/LoadingCircle.cs b/src/Shared/HandyControl_Shared/Controls/Loading/LoadingCircle.cs
index 988bafbe..cca91d14 100644
--- a/src/Shared/HandyControl_Shared/Controls/Loading/LoadingCircle.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Loading/LoadingCircle.cs
@@ -12,7 +12,7 @@ namespace HandyControl.Controls;
public class LoadingCircle : LoadingBase
{
public static readonly DependencyProperty DotOffSetProperty = DependencyProperty.Register(
- "DotOffSet", typeof(double), typeof(LoadingCircle),
+ nameof(DotOffSet), typeof(double), typeof(LoadingCircle),
new FrameworkPropertyMetadata(20.0, FrameworkPropertyMetadataOptions.AffectsRender));
public double DotOffSet
@@ -22,7 +22,7 @@ public class LoadingCircle : LoadingBase
}
public static readonly DependencyProperty NeedHiddenProperty = DependencyProperty.Register(
- "NeedHidden", typeof(bool), typeof(LoadingCircle),
+ nameof(NeedHidden), typeof(bool), typeof(LoadingCircle),
new FrameworkPropertyMetadata(ValueBoxes.TrueBox, FrameworkPropertyMetadataOptions.AffectsRender));
public bool NeedHidden
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/AnimationPath.cs b/src/Shared/HandyControl_Shared/Controls/Other/AnimationPath.cs
index 8686615f..bb335336 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/AnimationPath.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/AnimationPath.cs
@@ -37,7 +37,7 @@ public class AnimationPath : Shape
protected override Geometry DefiningGeometry => Data ?? Geometry.Empty;
public static readonly DependencyProperty PathLengthProperty = DependencyProperty.Register(
- "PathLength", typeof(double), typeof(AnimationPath), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, OnPropertiesChanged));
+ nameof(PathLength), typeof(double), typeof(AnimationPath), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, OnPropertiesChanged));
public double PathLength
{
@@ -46,7 +46,7 @@ public class AnimationPath : Shape
}
public static readonly DependencyProperty DurationProperty = DependencyProperty.Register(
- "Duration", typeof(Duration), typeof(AnimationPath), new FrameworkPropertyMetadata(new Duration(TimeSpan.FromSeconds(2)),
+ nameof(Duration), typeof(Duration), typeof(AnimationPath), new FrameworkPropertyMetadata(new Duration(TimeSpan.FromSeconds(2)),
OnPropertiesChanged));
public Duration Duration
@@ -56,7 +56,7 @@ public class AnimationPath : Shape
}
public static readonly DependencyProperty IsPlayingProperty = DependencyProperty.Register(
- "IsPlaying", typeof(bool), typeof(AnimationPath), new FrameworkPropertyMetadata(ValueBoxes.TrueBox, (o, args) =>
+ nameof(IsPlaying), typeof(bool), typeof(AnimationPath), new FrameworkPropertyMetadata(ValueBoxes.TrueBox, (o, args) =>
{
var ctl = (AnimationPath) o;
var v = (bool) args.NewValue;
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Badge.cs b/src/Shared/HandyControl_Shared/Controls/Other/Badge.cs
index b745b0ac..f92fe3a9 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/Badge.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/Badge.cs
@@ -24,7 +24,7 @@ public class Badge : ContentControl
}
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
- "Text", typeof(string), typeof(Badge), new PropertyMetadata("0"));
+ nameof(Text), typeof(string), typeof(Badge), new PropertyMetadata("0"));
public string Text
{
@@ -33,7 +33,7 @@ public class Badge : ContentControl
}
public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
- "Value", typeof(int), typeof(Badge), new PropertyMetadata(ValueBoxes.Int0Box, OnValueChanged));
+ nameof(Value), typeof(int), typeof(Badge), new PropertyMetadata(ValueBoxes.Int0Box, OnValueChanged));
private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -60,7 +60,7 @@ public class Badge : ContentControl
}
public static readonly DependencyProperty StatusProperty = DependencyProperty.Register(
- "Status", typeof(BadgeStatus), typeof(Badge), new PropertyMetadata(default(BadgeStatus)));
+ nameof(Status), typeof(BadgeStatus), typeof(Badge), new PropertyMetadata(default(BadgeStatus)));
public BadgeStatus Status
{
@@ -69,7 +69,7 @@ public class Badge : ContentControl
}
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
- "Maximum", typeof(int), typeof(Badge), new PropertyMetadata(ValueBoxes.Int99Box, OnMaximumChanged));
+ nameof(Maximum), typeof(int), typeof(Badge), new PropertyMetadata(ValueBoxes.Int99Box, OnMaximumChanged));
private static void OnMaximumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -85,7 +85,7 @@ public class Badge : ContentControl
}
public static readonly DependencyProperty BadgeMarginProperty = DependencyProperty.Register(
- "BadgeMargin", typeof(Thickness), typeof(Badge), new PropertyMetadata(default(Thickness)));
+ nameof(BadgeMargin), typeof(Thickness), typeof(Badge), new PropertyMetadata(default(Thickness)));
public Thickness BadgeMargin
{
@@ -94,7 +94,7 @@ public class Badge : ContentControl
}
public static readonly DependencyProperty ShowBadgeProperty = DependencyProperty.Register(
- "ShowBadge", typeof(bool), typeof(Badge), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowBadge), typeof(bool), typeof(Badge), new PropertyMetadata(ValueBoxes.TrueBox));
public bool ShowBadge
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/BlendEffectBox.cs b/src/Shared/HandyControl_Shared/Controls/Other/BlendEffectBox.cs
index dd2497d6..94d82477 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/BlendEffectBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/BlendEffectBox.cs
@@ -96,7 +96,7 @@ public class BlendEffectBox : Control
public Collection Effects { get; }
public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(
- "Content", typeof(FrameworkElement), typeof(BlendEffectBox), new PropertyMetadata(default(FrameworkElement)));
+ nameof(Content), typeof(FrameworkElement), typeof(BlendEffectBox), new PropertyMetadata(default(FrameworkElement)));
public FrameworkElement Content
{
@@ -105,7 +105,7 @@ public class BlendEffectBox : Control
}
internal static readonly DependencyProperty ActualContentProperty = DependencyProperty.Register(
- "ActualContent", typeof(FrameworkElement), typeof(BlendEffectBox), new PropertyMetadata(default(FrameworkElement)));
+ nameof(ActualContent), typeof(FrameworkElement), typeof(BlendEffectBox), new PropertyMetadata(default(FrameworkElement)));
internal FrameworkElement ActualContent
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Card.cs b/src/Shared/HandyControl_Shared/Controls/Other/Card.cs
index 61e08053..abe3fc2b 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/Card.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/Card.cs
@@ -7,7 +7,7 @@ namespace HandyControl.Controls;
public class Card : ContentControl
{
public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register(
- "Header", typeof(object), typeof(Card), new PropertyMetadata(default(object)));
+ nameof(Header), typeof(object), typeof(Card), new PropertyMetadata(default(object)));
public object Header
{
@@ -16,7 +16,7 @@ public class Card : ContentControl
}
public static readonly DependencyProperty HeaderTemplateProperty = DependencyProperty.Register(
- "HeaderTemplate", typeof(DataTemplate), typeof(Card), new PropertyMetadata(default(DataTemplate)));
+ nameof(HeaderTemplate), typeof(DataTemplate), typeof(Card), new PropertyMetadata(default(DataTemplate)));
[Bindable(true), Category("Content")]
public DataTemplate HeaderTemplate
@@ -26,7 +26,7 @@ public class Card : ContentControl
}
public static readonly DependencyProperty HeaderTemplateSelectorProperty = DependencyProperty.Register(
- "HeaderTemplateSelector", typeof(DataTemplateSelector), typeof(Card), new PropertyMetadata(default(DataTemplateSelector)));
+ nameof(HeaderTemplateSelector), typeof(DataTemplateSelector), typeof(Card), new PropertyMetadata(default(DataTemplateSelector)));
[Bindable(true), Category("Content")]
public DataTemplateSelector HeaderTemplateSelector
@@ -36,7 +36,7 @@ public class Card : ContentControl
}
public static readonly DependencyProperty HeaderStringFormatProperty = DependencyProperty.Register(
- "HeaderStringFormat", typeof(string), typeof(Card), new PropertyMetadata(default(string)));
+ nameof(HeaderStringFormat), typeof(string), typeof(Card), new PropertyMetadata(default(string)));
[Bindable(true), Category("Content")]
public string HeaderStringFormat
@@ -46,7 +46,7 @@ public class Card : ContentControl
}
public static readonly DependencyProperty FooterProperty = DependencyProperty.Register(
- "Footer", typeof(object), typeof(Card), new PropertyMetadata(default(object)));
+ nameof(Footer), typeof(object), typeof(Card), new PropertyMetadata(default(object)));
public object Footer
{
@@ -55,7 +55,7 @@ public class Card : ContentControl
}
public static readonly DependencyProperty FooterTemplateProperty = DependencyProperty.Register(
- "FooterTemplate", typeof(DataTemplate), typeof(Card), new PropertyMetadata(default(DataTemplate)));
+ nameof(FooterTemplate), typeof(DataTemplate), typeof(Card), new PropertyMetadata(default(DataTemplate)));
[Bindable(true), Category("Content")]
public DataTemplate FooterTemplate
@@ -65,7 +65,7 @@ public class Card : ContentControl
}
public static readonly DependencyProperty FooterTemplateSelectorProperty = DependencyProperty.Register(
- "FooterTemplateSelector", typeof(DataTemplateSelector), typeof(Card), new PropertyMetadata(default(DataTemplateSelector)));
+ nameof(FooterTemplateSelector), typeof(DataTemplateSelector), typeof(Card), new PropertyMetadata(default(DataTemplateSelector)));
[Bindable(true), Category("Content")]
public DataTemplateSelector FooterTemplateSelector
@@ -75,7 +75,7 @@ public class Card : ContentControl
}
public static readonly DependencyProperty FooterStringFormatProperty = DependencyProperty.Register(
- "FooterStringFormat", typeof(string), typeof(Card), new PropertyMetadata(default(string)));
+ nameof(FooterStringFormat), typeof(string), typeof(Card), new PropertyMetadata(default(string)));
[Bindable(true), Category("Content")]
public string FooterStringFormat
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/ChatBubble.cs b/src/Shared/HandyControl_Shared/Controls/Other/ChatBubble.cs
index a7a603b5..b629d83c 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/ChatBubble.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/ChatBubble.cs
@@ -7,7 +7,7 @@ namespace HandyControl.Controls;
public class ChatBubble : SelectableItem
{
public static readonly DependencyProperty RoleProperty = DependencyProperty.Register(
- "Role", typeof(ChatRoleType), typeof(ChatBubble), new PropertyMetadata(default(ChatRoleType)));
+ nameof(Role), typeof(ChatRoleType), typeof(ChatBubble), new PropertyMetadata(default(ChatRoleType)));
public ChatRoleType Role
{
@@ -16,7 +16,7 @@ public class ChatBubble : SelectableItem
}
public static readonly DependencyProperty TypeProperty = DependencyProperty.Register(
- "Type", typeof(ChatMessageType), typeof(ChatBubble), new PropertyMetadata(default(ChatMessageType)));
+ nameof(Type), typeof(ChatMessageType), typeof(ChatBubble), new PropertyMetadata(default(ChatMessageType)));
public ChatMessageType Type
{
@@ -25,7 +25,7 @@ public class ChatBubble : SelectableItem
}
public static readonly DependencyProperty IsReadProperty = DependencyProperty.Register(
- "IsRead", typeof(bool), typeof(ChatBubble), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsRead), typeof(bool), typeof(ChatBubble), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsRead
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/DashedBorder.cs b/src/Shared/HandyControl_Shared/Controls/Other/DashedBorder.cs
index 52649324..4400b9e2 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/DashedBorder.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/DashedBorder.cs
@@ -38,7 +38,7 @@ public class DashedBorder : Decorator
}
public static readonly DependencyProperty BorderThicknessProperty = DependencyProperty.Register(
- "BorderThickness", typeof(Thickness), typeof(DashedBorder), new FrameworkPropertyMetadata(default(Thickness),
+ nameof(BorderThickness), typeof(Thickness), typeof(DashedBorder), new FrameworkPropertyMetadata(default(Thickness),
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender,
OnClearPenCache));
@@ -49,7 +49,7 @@ public class DashedBorder : Decorator
}
public static readonly DependencyProperty BorderDashThicknessProperty = DependencyProperty.Register(
- "BorderDashThickness", typeof(double), typeof(DashedBorder), new FrameworkPropertyMetadata(ValueBoxes.Double0Box,
+ nameof(BorderDashThickness), typeof(double), typeof(DashedBorder), new FrameworkPropertyMetadata(ValueBoxes.Double0Box,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender,
OnClearPenCache));
@@ -60,7 +60,7 @@ public class DashedBorder : Decorator
}
public static readonly DependencyProperty PaddingProperty = DependencyProperty.Register(
- "Padding", typeof(Thickness), typeof(DashedBorder), new FrameworkPropertyMetadata(default(Thickness),
+ nameof(Padding), typeof(Thickness), typeof(DashedBorder), new FrameworkPropertyMetadata(default(Thickness),
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender));
public Thickness Padding
@@ -70,7 +70,7 @@ public class DashedBorder : Decorator
}
public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register(
- "CornerRadius", typeof(CornerRadius), typeof(DashedBorder), new FrameworkPropertyMetadata(default(CornerRadius),
+ nameof(CornerRadius), typeof(CornerRadius), typeof(DashedBorder), new FrameworkPropertyMetadata(default(CornerRadius),
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender));
public CornerRadius CornerRadius
@@ -80,7 +80,7 @@ public class DashedBorder : Decorator
}
public static readonly DependencyProperty BorderBrushProperty = DependencyProperty.Register(
- "BorderBrush", typeof(Brush), typeof(DashedBorder), new FrameworkPropertyMetadata(default(Brush),
+ nameof(BorderBrush), typeof(Brush), typeof(DashedBorder), new FrameworkPropertyMetadata(default(Brush),
FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.SubPropertiesDoNotAffectRender,
OnClearPenCache));
@@ -91,7 +91,7 @@ public class DashedBorder : Decorator
}
public static readonly DependencyProperty BackgroundProperty = DependencyProperty.Register(
- "Background", typeof(Brush), typeof(DashedBorder), new FrameworkPropertyMetadata(default(Brush),
+ nameof(Background), typeof(Brush), typeof(DashedBorder), new FrameworkPropertyMetadata(default(Brush),
FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.SubPropertiesDoNotAffectRender,
OnClearPenCache));
@@ -102,7 +102,7 @@ public class DashedBorder : Decorator
}
public static readonly DependencyProperty BorderDashArrayProperty = DependencyProperty.Register(
- "BorderDashArray", typeof(DoubleCollection), typeof(DashedBorder), new FrameworkPropertyMetadata(default(DoubleCollection),
+ nameof(BorderDashArray), typeof(DoubleCollection), typeof(DashedBorder), new FrameworkPropertyMetadata(default(DoubleCollection),
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender,
OnClearPenCache));
@@ -113,7 +113,7 @@ public class DashedBorder : Decorator
}
public static readonly DependencyProperty BorderDashCapProperty = DependencyProperty.Register(
- "BorderDashCap", typeof(PenLineCap), typeof(DashedBorder), new FrameworkPropertyMetadata(default(PenLineCap),
+ nameof(BorderDashCap), typeof(PenLineCap), typeof(DashedBorder), new FrameworkPropertyMetadata(default(PenLineCap),
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender,
OnClearPenCache));
@@ -124,7 +124,7 @@ public class DashedBorder : Decorator
}
public static readonly DependencyProperty BorderDashOffsetProperty = DependencyProperty.Register(
- "BorderDashOffset", typeof(double), typeof(DashedBorder), new FrameworkPropertyMetadata(ValueBoxes.Double0Box,
+ nameof(BorderDashOffset), typeof(double), typeof(DashedBorder), new FrameworkPropertyMetadata(ValueBoxes.Double0Box,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender,
OnClearPenCache));
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Divider.cs b/src/Shared/HandyControl_Shared/Controls/Other/Divider.cs
index 488d10b3..8cbfb07a 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/Divider.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/Divider.cs
@@ -11,7 +11,7 @@ namespace HandyControl.Controls;
public class Divider : Control
{
public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(
- "Content", typeof(object), typeof(Divider), new PropertyMetadata(default(object)));
+ nameof(Content), typeof(object), typeof(Divider), new PropertyMetadata(default(object)));
public object Content
{
@@ -20,7 +20,7 @@ public class Divider : Control
}
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
- "Orientation", typeof(Orientation), typeof(Divider), new PropertyMetadata(default(Orientation)));
+ nameof(Orientation), typeof(Orientation), typeof(Divider), new PropertyMetadata(default(Orientation)));
public Orientation Orientation
{
@@ -29,7 +29,7 @@ public class Divider : Control
}
public static readonly DependencyProperty ContentTemplateProperty = DependencyProperty.Register(
- "ContentTemplate", typeof(DataTemplate), typeof(Divider), new PropertyMetadata(default(DataTemplate)));
+ nameof(ContentTemplate), typeof(DataTemplate), typeof(Divider), new PropertyMetadata(default(DataTemplate)));
public DataTemplate ContentTemplate
{
@@ -38,7 +38,7 @@ public class Divider : Control
}
public static readonly DependencyProperty ContentStringFormatProperty = DependencyProperty.Register(
- "ContentStringFormat", typeof(string), typeof(Divider), new PropertyMetadata(default(string)));
+ nameof(ContentStringFormat), typeof(string), typeof(Divider), new PropertyMetadata(default(string)));
public string ContentStringFormat
{
@@ -47,7 +47,7 @@ public class Divider : Control
}
public static readonly DependencyProperty ContentTemplateSelectorProperty = DependencyProperty.Register(
- "ContentTemplateSelector", typeof(DataTemplateSelector), typeof(Divider), new PropertyMetadata(default(DataTemplateSelector)));
+ nameof(ContentTemplateSelector), typeof(DataTemplateSelector), typeof(Divider), new PropertyMetadata(default(DataTemplateSelector)));
public DataTemplateSelector ContentTemplateSelector
{
@@ -56,7 +56,7 @@ public class Divider : Control
}
public static readonly DependencyProperty LineStrokeProperty = DependencyProperty.Register(
- "LineStroke", typeof(Brush), typeof(Divider), new PropertyMetadata(default(Brush)));
+ nameof(LineStroke), typeof(Brush), typeof(Divider), new PropertyMetadata(default(Brush)));
public Brush LineStroke
{
@@ -65,7 +65,7 @@ public class Divider : Control
}
public static readonly DependencyProperty LineStrokeThicknessProperty = DependencyProperty.Register(
- "LineStrokeThickness", typeof(double), typeof(Divider), new PropertyMetadata(ValueBoxes.Double1Box));
+ nameof(LineStrokeThickness), typeof(double), typeof(Divider), new PropertyMetadata(ValueBoxes.Double1Box));
public double LineStrokeThickness
{
@@ -74,7 +74,7 @@ public class Divider : Control
}
public static readonly DependencyProperty LineStrokeDashArrayProperty = DependencyProperty.Register(
- "LineStrokeDashArray", typeof(DoubleCollection), typeof(Divider), new PropertyMetadata(new DoubleCollection()));
+ nameof(LineStrokeDashArray), typeof(DoubleCollection), typeof(Divider), new PropertyMetadata(new DoubleCollection()));
public DoubleCollection LineStrokeDashArray
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Empty.cs b/src/Shared/HandyControl_Shared/Controls/Other/Empty.cs
index 88ba029e..dacdc0d7 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/Empty.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/Empty.cs
@@ -7,7 +7,7 @@ namespace HandyControl.Controls;
public class Empty : ContentControl
{
public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register(
- "Description", typeof(object), typeof(Empty), new PropertyMetadata(default(object)));
+ nameof(Description), typeof(object), typeof(Empty), new PropertyMetadata(default(object)));
public object Description
{
@@ -16,7 +16,7 @@ public class Empty : ContentControl
}
public static readonly DependencyProperty LogoProperty = DependencyProperty.Register(
- "Logo", typeof(object), typeof(Empty), new PropertyMetadata(default(object)));
+ nameof(Logo), typeof(object), typeof(Empty), new PropertyMetadata(default(object)));
public object Logo
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/GotoTop.cs b/src/Shared/HandyControl_Shared/Controls/Other/GotoTop.cs
index d49a381f..15e93625 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/GotoTop.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/GotoTop.cs
@@ -14,7 +14,7 @@ public class GotoTop : Button
private System.Windows.Controls.ScrollViewer _scrollViewer;
public static readonly DependencyProperty TargetProperty = DependencyProperty.Register(
- "Target", typeof(DependencyObject), typeof(GotoTop), new PropertyMetadata(default(DependencyObject)));
+ nameof(Target), typeof(DependencyObject), typeof(GotoTop), new PropertyMetadata(default(DependencyObject)));
public DependencyObject Target
{
@@ -55,7 +55,7 @@ public class GotoTop : Button
}
public static readonly DependencyProperty AnimatedProperty = DependencyProperty.Register(
- "Animated", typeof(bool), typeof(GotoTop), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(Animated), typeof(bool), typeof(GotoTop), new PropertyMetadata(ValueBoxes.TrueBox));
public bool Animated
{
@@ -64,7 +64,7 @@ public class GotoTop : Button
}
public static readonly DependencyProperty AnimationTimeProperty = DependencyProperty.Register(
- "AnimationTime", typeof(double), typeof(GotoTop), new PropertyMetadata(ValueBoxes.Double200Box));
+ nameof(AnimationTime), typeof(double), typeof(GotoTop), new PropertyMetadata(ValueBoxes.Double200Box));
public double AnimationTime
{
@@ -73,7 +73,7 @@ public class GotoTop : Button
}
public static readonly DependencyProperty HidingHeightProperty = DependencyProperty.Register(
- "HidingHeight", typeof(double), typeof(GotoTop), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(HidingHeight), typeof(double), typeof(GotoTop), new PropertyMetadata(ValueBoxes.Double0Box));
public double HidingHeight
{
@@ -82,7 +82,7 @@ public class GotoTop : Button
}
public static readonly DependencyProperty AutoHidingProperty = DependencyProperty.Register(
- "AutoHiding", typeof(bool), typeof(GotoTop), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(AutoHiding), typeof(bool), typeof(GotoTop), new PropertyMetadata(ValueBoxes.TrueBox));
public bool AutoHiding
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Gravatar.cs b/src/Shared/HandyControl_Shared/Controls/Other/Gravatar.cs
index 89e8dcaa..56d47d3b 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/Gravatar.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/Gravatar.cs
@@ -9,7 +9,7 @@ namespace HandyControl.Controls;
public class Gravatar : ContentControl
{
public static readonly DependencyProperty GeneratorProperty = DependencyProperty.Register(
- "Generator", typeof(IGravatarGenerator), typeof(Gravatar), new PropertyMetadata(new GithubGravatarGenerator()));
+ nameof(Generator), typeof(IGravatarGenerator), typeof(Gravatar), new PropertyMetadata(new GithubGravatarGenerator()));
public IGravatarGenerator Generator
{
@@ -18,7 +18,7 @@ public class Gravatar : ContentControl
}
public static readonly DependencyProperty IdProperty = DependencyProperty.Register(
- "Id", typeof(string), typeof(Gravatar), new PropertyMetadata(default(string), OnIdChanged));
+ nameof(Id), typeof(string), typeof(Gravatar), new PropertyMetadata(default(string), OnIdChanged));
private static void OnIdChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -34,7 +34,7 @@ public class Gravatar : ContentControl
}
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
- "Source", typeof(ImageSource), typeof(Gravatar), new PropertyMetadata(default(ImageSource), OnSourceChanged));
+ nameof(Source), typeof(ImageSource), typeof(Gravatar), new PropertyMetadata(default(ImageSource), OnSourceChanged));
private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Magnifier.cs b/src/Shared/HandyControl_Shared/Controls/Other/Magnifier.cs
index d323b01c..a240c250 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/Magnifier.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/Magnifier.cs
@@ -23,7 +23,7 @@ public class Magnifier : AdornerElement
private readonly TranslateTransform _translateTransform;
public static readonly DependencyProperty HorizontalOffsetProperty = DependencyProperty.Register(
- "HorizontalOffset", typeof(double), typeof(Magnifier), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(HorizontalOffset), typeof(double), typeof(Magnifier), new PropertyMetadata(ValueBoxes.Double0Box));
public double HorizontalOffset
{
@@ -32,7 +32,7 @@ public class Magnifier : AdornerElement
}
public static readonly DependencyProperty VerticalOffsetProperty = DependencyProperty.Register(
- "VerticalOffset", typeof(double), typeof(Magnifier), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(VerticalOffset), typeof(double), typeof(Magnifier), new PropertyMetadata(ValueBoxes.Double0Box));
public double VerticalOffset
{
@@ -43,7 +43,7 @@ public class Magnifier : AdornerElement
public static Magnifier Default => new();
public static readonly DependencyProperty ScaleProperty = DependencyProperty.Register(
- "Scale", typeof(double), typeof(Magnifier), new PropertyMetadata(5.0, OnScaleChanged), ValidateHelper.IsInRangeOfPosDouble);
+ nameof(Scale), typeof(double), typeof(Magnifier), new PropertyMetadata(5.0, OnScaleChanged), ValidateHelper.IsInRangeOfPosDouble);
private static void OnScaleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => ((Magnifier) d).UpdateViewboxSize();
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/NotifyIcon.cs b/src/Shared/HandyControl_Shared/Controls/Other/NotifyIcon.cs
index 10ce37f2..8004fe49 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/NotifyIcon.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/NotifyIcon.cs
@@ -223,7 +223,7 @@ public class NotifyIcon : FrameworkElement, IDisposable
}
public static readonly DependencyProperty TokenProperty = DependencyProperty.Register(
- "Token", typeof(string), typeof(NotifyIcon), new PropertyMetadata(default(string), OnTokenChanged));
+ nameof(Token), typeof(string), typeof(NotifyIcon), new PropertyMetadata(default(string), OnTokenChanged));
private static void OnTokenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -247,7 +247,7 @@ public class NotifyIcon : FrameworkElement, IDisposable
}
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
- "Text", typeof(string), typeof(NotifyIcon), new PropertyMetadata(default(string)));
+ nameof(Text), typeof(string), typeof(NotifyIcon), new PropertyMetadata(default(string)));
public string Text
{
@@ -256,7 +256,7 @@ public class NotifyIcon : FrameworkElement, IDisposable
}
public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
- "Icon", typeof(ImageSource), typeof(NotifyIcon), new PropertyMetadata(default(ImageSource), OnIconChanged));
+ nameof(Icon), typeof(ImageSource), typeof(NotifyIcon), new PropertyMetadata(default(ImageSource), OnIconChanged));
private static void OnIconChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -277,7 +277,7 @@ public class NotifyIcon : FrameworkElement, IDisposable
}
public static readonly DependencyProperty ContextContentProperty = DependencyProperty.Register(
- "ContextContent", typeof(object), typeof(NotifyIcon), new PropertyMetadata(default(object)));
+ nameof(ContextContent), typeof(object), typeof(NotifyIcon), new PropertyMetadata(default(object)));
public object ContextContent
{
@@ -286,7 +286,7 @@ public class NotifyIcon : FrameworkElement, IDisposable
}
public static readonly DependencyProperty BlinkIntervalProperty = DependencyProperty.Register(
- "BlinkInterval", typeof(TimeSpan), typeof(NotifyIcon), new PropertyMetadata(TimeSpan.FromMilliseconds(500), OnBlinkIntervalChanged));
+ nameof(BlinkInterval), typeof(TimeSpan), typeof(NotifyIcon), new PropertyMetadata(TimeSpan.FromMilliseconds(500), OnBlinkIntervalChanged));
private static void OnBlinkIntervalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -304,7 +304,7 @@ public class NotifyIcon : FrameworkElement, IDisposable
}
public static readonly DependencyProperty IsBlinkProperty = DependencyProperty.Register(
- "IsBlink", typeof(bool), typeof(NotifyIcon), new PropertyMetadata(ValueBoxes.FalseBox, OnIsBlinkChanged));
+ nameof(IsBlink), typeof(bool), typeof(NotifyIcon), new PropertyMetadata(ValueBoxes.FalseBox, OnIsBlinkChanged));
private static void OnIsBlinkChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Pagination.cs b/src/Shared/HandyControl_Shared/Controls/Other/Pagination.cs
index 19b47a97..281c5441 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/Pagination.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/Pagination.cs
@@ -89,7 +89,7 @@ public class Pagination : Control
/// 最大页数
///
public static readonly DependencyProperty MaxPageCountProperty = DependencyProperty.Register(
- "MaxPageCount", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnMaxPageCountChanged, CoerceMaxPageCount), ValidateHelper.IsInRangeOfPosIntIncludeZero);
+ nameof(MaxPageCount), typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnMaxPageCountChanged, CoerceMaxPageCount), ValidateHelper.IsInRangeOfPosIntIncludeZero);
private static object CoerceMaxPageCount(DependencyObject d, object basevalue)
{
@@ -129,7 +129,7 @@ public class Pagination : Control
/// 每页的数据量
///
public static readonly DependencyProperty DataCountPerPageProperty = DependencyProperty.Register(
- "DataCountPerPage", typeof(int), typeof(Pagination), new PropertyMetadata(20, OnDataCountPerPageChanged),
+ nameof(DataCountPerPage), typeof(int), typeof(Pagination), new PropertyMetadata(20, OnDataCountPerPageChanged),
ValidateHelper.IsInRangeOfPosInt);
private static void OnDataCountPerPageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
@@ -157,7 +157,7 @@ public class Pagination : Control
/// 当前页
///
public static readonly DependencyProperty PageIndexProperty = DependencyProperty.Register(
- "PageIndex", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnPageIndexChanged, CoercePageIndex), ValidateHelper.IsInRangeOfPosIntIncludeZero);
+ nameof(PageIndex), typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, OnPageIndexChanged, CoercePageIndex), ValidateHelper.IsInRangeOfPosIntIncludeZero);
private static object CoercePageIndex(DependencyObject d, object basevalue)
{
@@ -200,7 +200,7 @@ public class Pagination : Control
/// 表示当前选中的按钮距离左右两个方向按钮的最大间隔(4表示间隔4个按钮,如果超过则用省略号表示)
///
public static readonly DependencyProperty MaxPageIntervalProperty = DependencyProperty.Register(
- "MaxPageInterval", typeof(int), typeof(Pagination), new PropertyMetadata(3, OnMaxPageIntervalChanged), ValidateHelper.IsInRangeOfPosIntIncludeZero);
+ nameof(MaxPageInterval), typeof(int), typeof(Pagination), new PropertyMetadata(3, OnMaxPageIntervalChanged), ValidateHelper.IsInRangeOfPosIntIncludeZero);
private static void OnMaxPageIntervalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -224,7 +224,7 @@ public class Pagination : Control
#region IsJumpEnabled
public static readonly DependencyProperty IsJumpEnabledProperty = DependencyProperty.Register(
- "IsJumpEnabled", typeof(bool), typeof(Pagination), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsJumpEnabled), typeof(bool), typeof(Pagination), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsJumpEnabled
{
@@ -237,7 +237,7 @@ public class Pagination : Control
#region AutoHiding
public static readonly DependencyProperty AutoHidingProperty = DependencyProperty.Register(
- "AutoHiding", typeof(bool), typeof(Pagination), new PropertyMetadata(ValueBoxes.TrueBox, OnAutoHidingChanged));
+ nameof(AutoHiding), typeof(bool), typeof(Pagination), new PropertyMetadata(ValueBoxes.TrueBox, OnAutoHidingChanged));
private static void OnAutoHidingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Poptip.cs b/src/Shared/HandyControl_Shared/Controls/Other/Poptip.cs
index c58607c6..4940a448 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/Poptip.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/Poptip.cs
@@ -71,7 +71,7 @@ public class Poptip : AdornerElement
}
public static readonly DependencyProperty ContentTemplateProperty = DependencyProperty.Register(
- "ContentTemplate", typeof(DataTemplate), typeof(Poptip), new PropertyMetadata(default(DataTemplate)));
+ nameof(ContentTemplate), typeof(DataTemplate), typeof(Poptip), new PropertyMetadata(default(DataTemplate)));
public DataTemplate ContentTemplate
{
@@ -80,7 +80,7 @@ public class Poptip : AdornerElement
}
public static readonly DependencyProperty ContentStringFormatProperty = DependencyProperty.Register(
- "ContentStringFormat", typeof(string), typeof(Poptip), new PropertyMetadata(default(string)));
+ nameof(ContentStringFormat), typeof(string), typeof(Poptip), new PropertyMetadata(default(string)));
public string ContentStringFormat
{
@@ -89,7 +89,7 @@ public class Poptip : AdornerElement
}
public static readonly DependencyProperty ContentTemplateSelectorProperty = DependencyProperty.Register(
- "ContentTemplateSelector", typeof(DataTemplateSelector), typeof(Poptip), new PropertyMetadata(default(DataTemplateSelector)));
+ nameof(ContentTemplateSelector), typeof(DataTemplateSelector), typeof(Poptip), new PropertyMetadata(default(DataTemplateSelector)));
public DataTemplateSelector ContentTemplateSelector
{
@@ -178,7 +178,7 @@ public class Poptip : AdornerElement
}
public static readonly DependencyProperty DelayProperty = DependencyProperty.Register(
- "Delay", typeof(double), typeof(Poptip), new PropertyMetadata(1000.0), ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
+ nameof(Delay), typeof(double), typeof(Poptip), new PropertyMetadata(1000.0), ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
public double Delay
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/ScrollViewer.cs b/src/Shared/HandyControl_Shared/Controls/Other/ScrollViewer.cs
index 29676dd3..3ed2d425 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/ScrollViewer.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/ScrollViewer.cs
@@ -21,7 +21,7 @@ public class ScrollViewer : System.Windows.Controls.ScrollViewer
/// 是否响应鼠标滚轮操作
///
public static readonly DependencyProperty CanMouseWheelProperty = DependencyProperty.Register(
- "CanMouseWheel", typeof(bool), typeof(ScrollViewer), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(CanMouseWheel), typeof(bool), typeof(ScrollViewer), new PropertyMetadata(ValueBoxes.TrueBox));
///
/// 是否响应鼠标滚轮操作
@@ -166,7 +166,7 @@ public class ScrollViewer : System.Windows.Controls.ScrollViewer
/// 当前垂直滚动偏移
///
internal static readonly DependencyProperty CurrentVerticalOffsetProperty = DependencyProperty.Register(
- "CurrentVerticalOffset", typeof(double), typeof(ScrollViewer), new PropertyMetadata(ValueBoxes.Double0Box, OnCurrentVerticalOffsetChanged));
+ nameof(CurrentVerticalOffset), typeof(double), typeof(ScrollViewer), new PropertyMetadata(ValueBoxes.Double0Box, OnCurrentVerticalOffsetChanged));
private static void OnCurrentVerticalOffsetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -190,7 +190,7 @@ public class ScrollViewer : System.Windows.Controls.ScrollViewer
/// 当前水平滚动偏移
///
internal static readonly DependencyProperty CurrentHorizontalOffsetProperty = DependencyProperty.Register(
- "CurrentHorizontalOffset", typeof(double), typeof(ScrollViewer), new PropertyMetadata(ValueBoxes.Double0Box, OnCurrentHorizontalOffsetChanged));
+ nameof(CurrentHorizontalOffset), typeof(double), typeof(ScrollViewer), new PropertyMetadata(ValueBoxes.Double0Box, OnCurrentHorizontalOffsetChanged));
private static void OnCurrentHorizontalOffsetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Shield.cs b/src/Shared/HandyControl_Shared/Controls/Other/Shield.cs
index be6deea7..c13008d0 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/Shield.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/Shield.cs
@@ -9,7 +9,7 @@ namespace HandyControl.Controls;
public class Shield : ButtonBase
{
public static readonly DependencyProperty SubjectProperty = DependencyProperty.Register(
- "Subject", typeof(string), typeof(Shield), new PropertyMetadata(default(string)));
+ nameof(Subject), typeof(string), typeof(Shield), new PropertyMetadata(default(string)));
public string Subject
{
@@ -18,7 +18,7 @@ public class Shield : ButtonBase
}
public static readonly DependencyProperty StatusProperty = DependencyProperty.Register(
- "Status", typeof(object), typeof(Shield), new PropertyMetadata(default(object)));
+ nameof(Status), typeof(object), typeof(Shield), new PropertyMetadata(default(object)));
public object Status
{
@@ -27,7 +27,7 @@ public class Shield : ButtonBase
}
public static readonly DependencyProperty ColorProperty = DependencyProperty.Register(
- "Color", typeof(Brush), typeof(Shield), new PropertyMetadata(default(Brush)));
+ nameof(Color), typeof(Brush), typeof(Shield), new PropertyMetadata(default(Brush)));
public Brush Color
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/TransitioningContentControl.cs b/src/Shared/HandyControl_Shared/Controls/Other/TransitioningContentControl.cs
index cf5129bb..d7cc4e60 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/TransitioningContentControl.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/TransitioningContentControl.cs
@@ -22,7 +22,7 @@ public class TransitioningContentControl : ContentControl
}
public static readonly DependencyProperty TransitionModeProperty = DependencyProperty.Register(
- "TransitionMode", typeof(TransitionMode), typeof(TransitioningContentControl), new PropertyMetadata(default(TransitionMode), OnTransitionModeChanged));
+ nameof(TransitionMode), typeof(TransitionMode), typeof(TransitioningContentControl), new PropertyMetadata(default(TransitionMode), OnTransitionModeChanged));
private static void OnTransitionModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -43,7 +43,7 @@ public class TransitioningContentControl : ContentControl
}
public static readonly DependencyProperty TransitionStoryboardProperty = DependencyProperty.Register(
- "TransitionStoryboard", typeof(Storyboard), typeof(TransitioningContentControl), new PropertyMetadata(default(Storyboard)));
+ nameof(TransitionStoryboard), typeof(Storyboard), typeof(TransitioningContentControl), new PropertyMetadata(default(Storyboard)));
public Storyboard TransitionStoryboard
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/Watermark.cs b/src/Shared/HandyControl_Shared/Controls/Other/Watermark.cs
index 23ebe00c..78de2473 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/Watermark.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/Watermark.cs
@@ -18,7 +18,7 @@ public class Watermark : Control
private DrawingBrush _brush;
public static readonly DependencyProperty AngleProperty = DependencyProperty.Register(
- "Angle", typeof(double), typeof(Watermark), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(Angle), typeof(double), typeof(Watermark), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.AffectsRender));
public double Angle
{
@@ -27,7 +27,7 @@ public class Watermark : Control
}
public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(
- "Content", typeof(object), typeof(Watermark), new PropertyMetadata(default));
+ nameof(Content), typeof(object), typeof(Watermark), new PropertyMetadata(default));
public object Content
{
@@ -36,7 +36,7 @@ public class Watermark : Control
}
public static readonly DependencyProperty MarkProperty = DependencyProperty.Register(
- "Mark", typeof(object), typeof(Watermark), new FrameworkPropertyMetadata(default, FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(Mark), typeof(object), typeof(Watermark), new FrameworkPropertyMetadata(default, FrameworkPropertyMetadataOptions.AffectsRender));
public object Mark
{
@@ -45,7 +45,7 @@ public class Watermark : Control
}
public static readonly DependencyProperty MarkWidthProperty = DependencyProperty.Register(
- "MarkWidth", typeof(double), typeof(Watermark), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(MarkWidth), typeof(double), typeof(Watermark), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.AffectsRender));
public double MarkWidth
{
@@ -54,7 +54,7 @@ public class Watermark : Control
}
public static readonly DependencyProperty MarkHeightProperty = DependencyProperty.Register(
- "MarkHeight", typeof(double), typeof(Watermark), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(MarkHeight), typeof(double), typeof(Watermark), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.AffectsRender));
public double MarkHeight
{
@@ -63,7 +63,7 @@ public class Watermark : Control
}
public static readonly DependencyProperty MarkBrushProperty = DependencyProperty.Register(
- "MarkBrush", typeof(Brush), typeof(Watermark), new FrameworkPropertyMetadata(default(Brush), FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(MarkBrush), typeof(Brush), typeof(Watermark), new FrameworkPropertyMetadata(default(Brush), FrameworkPropertyMetadataOptions.AffectsRender));
public Brush MarkBrush
{
@@ -72,7 +72,7 @@ public class Watermark : Control
}
public static readonly DependencyProperty AutoSizeEnabledProperty = DependencyProperty.Register(
- "AutoSizeEnabled", typeof(bool), typeof(Watermark), new FrameworkPropertyMetadata(ValueBoxes.TrueBox, FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(AutoSizeEnabled), typeof(bool), typeof(Watermark), new FrameworkPropertyMetadata(ValueBoxes.TrueBox, FrameworkPropertyMetadataOptions.AffectsRender));
public bool AutoSizeEnabled
{
@@ -81,7 +81,7 @@ public class Watermark : Control
}
public static readonly DependencyProperty MarkMarginProperty = DependencyProperty.Register(
- "MarkMargin", typeof(Thickness), typeof(Watermark), new FrameworkPropertyMetadata(default(Thickness), FrameworkPropertyMetadataOptions.AffectsRender));
+ nameof(MarkMargin), typeof(Thickness), typeof(Watermark), new FrameworkPropertyMetadata(default(Thickness), FrameworkPropertyMetadataOptions.AffectsRender));
public Thickness MarkMargin
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/AxleCanvas.cs b/src/Shared/HandyControl_Shared/Controls/Panel/AxleCanvas.cs
index 3501b4fc..876d1bf7 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/AxleCanvas.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/AxleCanvas.cs
@@ -6,7 +6,7 @@ namespace HandyControl.Controls;
public class AxleCanvas : Canvas
{
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
- "Orientation", typeof(Orientation), typeof(AxleCanvas), new PropertyMetadata(default(Orientation)));
+ nameof(Orientation), typeof(Orientation), typeof(AxleCanvas), new PropertyMetadata(default(Orientation)));
public Orientation Orientation
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/CirclePanel.cs b/src/Shared/HandyControl_Shared/Controls/Panel/CirclePanel.cs
index 2d61506b..a4237535 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/CirclePanel.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/CirclePanel.cs
@@ -9,7 +9,7 @@ namespace HandyControl.Controls;
public class CirclePanel : Panel
{
public static readonly DependencyProperty DiameterProperty = DependencyProperty.Register(
- "Diameter", typeof(double), typeof(CirclePanel), new FrameworkPropertyMetadata(170.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
+ nameof(Diameter), typeof(double), typeof(CirclePanel), new FrameworkPropertyMetadata(170.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
public double Diameter
{
@@ -18,7 +18,7 @@ public class CirclePanel : Panel
}
public static readonly DependencyProperty KeepVerticalProperty = DependencyProperty.Register(
- "KeepVertical", typeof(bool), typeof(CirclePanel), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsMeasure));
+ nameof(KeepVertical), typeof(bool), typeof(CirclePanel), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsMeasure));
public bool KeepVertical
{
@@ -27,7 +27,7 @@ public class CirclePanel : Panel
}
public static readonly DependencyProperty OffsetAngleProperty = DependencyProperty.Register(
- "OffsetAngle", typeof(double), typeof(CirclePanel), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.AffectsMeasure));
+ nameof(OffsetAngle), typeof(double), typeof(CirclePanel), new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.AffectsMeasure));
public double OffsetAngle
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/ClipGrid.cs b/src/Shared/HandyControl_Shared/Controls/Panel/ClipGrid.cs
index 7ddcd61a..a668ac80 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/ClipGrid.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/ClipGrid.cs
@@ -8,7 +8,7 @@ namespace HandyControl.Controls
public class ClipGrid : Grid
{
public static readonly DependencyProperty IsClipEnabledProperty = DependencyProperty.Register(
- "IsClipEnabled", typeof(bool), typeof(ClipGrid), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(IsClipEnabled), typeof(bool), typeof(ClipGrid), new PropertyMetadata(ValueBoxes.TrueBox));
public bool IsClipEnabled
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/ElementGroup.cs b/src/Shared/HandyControl_Shared/Controls/Panel/ElementGroup.cs
index 4623dd04..0affb6f7 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/ElementGroup.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/ElementGroup.cs
@@ -24,7 +24,7 @@ public class ElementGroup : ItemsControl
}
public static readonly DependencyProperty LayoutProperty = DependencyProperty.Register(
- "Layout", typeof(LinearLayout), typeof(ElementGroup),
+ nameof(Layout), typeof(LinearLayout), typeof(ElementGroup),
new FrameworkPropertyMetadata(LinearLayout.Uniform, FrameworkPropertyMetadataOptions.AffectsMeasure));
public LinearLayout Layout
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/FlexPanel.cs b/src/Shared/HandyControl_Shared/Controls/Panel/FlexPanel.cs
index 80082d87..9aaed859 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/FlexPanel.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/FlexPanel.cs
@@ -77,7 +77,7 @@ public class FlexPanel : Panel
=> (FlexItemAlignment) element.GetValue(AlignSelfProperty);
public static readonly DependencyProperty FlexDirectionProperty = DependencyProperty.Register(
- "FlexDirection", typeof(FlexDirection), typeof(FlexPanel),
+ nameof(FlexDirection), typeof(FlexDirection), typeof(FlexPanel),
new FrameworkPropertyMetadata(default(FlexDirection), FrameworkPropertyMetadataOptions.AffectsMeasure));
public FlexDirection FlexDirection
@@ -87,7 +87,7 @@ public class FlexPanel : Panel
}
public static readonly DependencyProperty FlexWrapProperty = DependencyProperty.Register(
- "FlexWrap", typeof(FlexWrap), typeof(FlexPanel),
+ nameof(FlexWrap), typeof(FlexWrap), typeof(FlexPanel),
new FrameworkPropertyMetadata(default(FlexWrap), FrameworkPropertyMetadataOptions.AffectsMeasure));
public FlexWrap FlexWrap
@@ -97,7 +97,7 @@ public class FlexPanel : Panel
}
public static readonly DependencyProperty JustifyContentProperty = DependencyProperty.Register(
- "JustifyContent", typeof(FlexContentJustify), typeof(FlexPanel),
+ nameof(JustifyContent), typeof(FlexContentJustify), typeof(FlexPanel),
new FrameworkPropertyMetadata(default(FlexContentJustify),
FrameworkPropertyMetadataOptions.AffectsMeasure));
@@ -108,7 +108,7 @@ public class FlexPanel : Panel
}
public static readonly DependencyProperty AlignItemsProperty = DependencyProperty.Register(
- "AlignItems", typeof(FlexItemsAlignment), typeof(FlexPanel),
+ nameof(AlignItems), typeof(FlexItemsAlignment), typeof(FlexPanel),
new FrameworkPropertyMetadata(default(FlexItemsAlignment),
FrameworkPropertyMetadataOptions.AffectsMeasure));
@@ -119,7 +119,7 @@ public class FlexPanel : Panel
}
public static readonly DependencyProperty AlignContentProperty = DependencyProperty.Register(
- "AlignContent", typeof(FlexContentAlignment), typeof(FlexPanel),
+ nameof(AlignContent), typeof(FlexContentAlignment), typeof(FlexPanel),
new FrameworkPropertyMetadata(default(FlexContentAlignment),
FrameworkPropertyMetadataOptions.AffectsMeasure));
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Col.cs b/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Col.cs
index 41abe100..7caa97f7 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Col.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Col.cs
@@ -9,7 +9,7 @@ namespace HandyControl.Controls;
public class Col : ContentControl
{
public static readonly DependencyProperty LayoutProperty = DependencyProperty.Register(
- "Layout", typeof(ColLayout), typeof(Col), new PropertyMetadata(default(ColLayout)));
+ nameof(Layout), typeof(ColLayout), typeof(Col), new PropertyMetadata(default(ColLayout)));
public ColLayout Layout
{
@@ -18,7 +18,7 @@ public class Col : ContentControl
}
public static readonly DependencyProperty OffsetProperty = DependencyProperty.Register(
- "Offset", typeof(int), typeof(Col), new PropertyMetadata(ValueBoxes.Int0Box));
+ nameof(Offset), typeof(int), typeof(Col), new PropertyMetadata(ValueBoxes.Int0Box));
public int Offset
{
@@ -27,7 +27,7 @@ public class Col : ContentControl
}
public static readonly DependencyProperty SpanProperty = DependencyProperty.Register(
- "Span", typeof(int), typeof(Col), new PropertyMetadata(24), OnSpanValidate);
+ nameof(Span), typeof(int), typeof(Col), new PropertyMetadata(24), OnSpanValidate);
private static bool OnSpanValidate(object value)
{
@@ -42,7 +42,7 @@ public class Col : ContentControl
}
public static readonly DependencyProperty IsFixedProperty = DependencyProperty.Register(
- "IsFixed", typeof(bool), typeof(Col), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsFixed), typeof(bool), typeof(Col), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsFixed
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs b/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs
index aad5de3a..ba6f02dd 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs
@@ -17,7 +17,7 @@ public class Row : Panel
private double _totalAutoWidth;
public static readonly DependencyProperty GutterProperty = DependencyProperty.Register(
- "Gutter", typeof(double), typeof(Row), new PropertyMetadata(ValueBoxes.Double0Box, null, OnGutterCoerce), ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
+ nameof(Gutter), typeof(double), typeof(Row), new PropertyMetadata(ValueBoxes.Double0Box, null, OnGutterCoerce), ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
private static object OnGutterCoerce(DependencyObject d, object basevalue) => ValidateHelper.IsInRangeOfPosDoubleIncludeZero(basevalue) ? basevalue : .0;
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/UniformSpacingPanel.cs b/src/Shared/HandyControl_Shared/Controls/Panel/UniformSpacingPanel.cs
index 304f43b8..11b5ff50 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/UniformSpacingPanel.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/UniformSpacingPanel.cs
@@ -33,7 +33,7 @@ public class UniformSpacingPanel : Panel
}
public static readonly DependencyProperty ChildWrappingProperty = DependencyProperty.Register(
- "ChildWrapping", typeof(VisualWrapping), typeof(UniformSpacingPanel),
+ nameof(ChildWrapping), typeof(VisualWrapping), typeof(UniformSpacingPanel),
new FrameworkPropertyMetadata(default(VisualWrapping), FrameworkPropertyMetadataOptions.AffectsMeasure));
public VisualWrapping ChildWrapping
@@ -43,7 +43,7 @@ public class UniformSpacingPanel : Panel
}
public static readonly DependencyProperty SpacingProperty = DependencyProperty.Register(
- "Spacing", typeof(double), typeof(UniformSpacingPanel),
+ nameof(Spacing), typeof(double), typeof(UniformSpacingPanel),
new FrameworkPropertyMetadata(double.NaN, FrameworkPropertyMetadataOptions.AffectsMeasure), IsSpacingValid);
public double Spacing
@@ -53,7 +53,7 @@ public class UniformSpacingPanel : Panel
}
public static readonly DependencyProperty HorizontalSpacingProperty = DependencyProperty.Register(
- "HorizontalSpacing", typeof(double), typeof(UniformSpacingPanel),
+ nameof(HorizontalSpacing), typeof(double), typeof(UniformSpacingPanel),
new FrameworkPropertyMetadata(double.NaN, FrameworkPropertyMetadataOptions.AffectsMeasure), IsSpacingValid);
public double HorizontalSpacing
@@ -63,7 +63,7 @@ public class UniformSpacingPanel : Panel
}
public static readonly DependencyProperty VerticalSpacingProperty = DependencyProperty.Register(
- "VerticalSpacing", typeof(double), typeof(UniformSpacingPanel),
+ nameof(VerticalSpacing), typeof(double), typeof(UniformSpacingPanel),
new FrameworkPropertyMetadata(double.NaN, FrameworkPropertyMetadataOptions.AffectsMeasure), IsSpacingValid);
public double VerticalSpacing
@@ -73,7 +73,7 @@ public class UniformSpacingPanel : Panel
}
public static readonly DependencyProperty ItemWidthProperty = DependencyProperty.Register(
- "ItemWidth", typeof(double), typeof(UniformSpacingPanel),
+ nameof(ItemWidth), typeof(double), typeof(UniformSpacingPanel),
new FrameworkPropertyMetadata(double.NaN, FrameworkPropertyMetadataOptions.AffectsMeasure),
IsWidthHeightValid);
@@ -85,7 +85,7 @@ public class UniformSpacingPanel : Panel
}
public static readonly DependencyProperty ItemHeightProperty = DependencyProperty.Register(
- "ItemHeight", typeof(double), typeof(UniformSpacingPanel),
+ nameof(ItemHeight), typeof(double), typeof(UniformSpacingPanel),
new FrameworkPropertyMetadata(double.NaN, FrameworkPropertyMetadataOptions.AffectsMeasure),
IsWidthHeightValid);
@@ -97,7 +97,7 @@ public class UniformSpacingPanel : Panel
}
public static readonly DependencyProperty ItemHorizontalAlignmentProperty = DependencyProperty.Register(
- "ItemHorizontalAlignment", typeof(HorizontalAlignment?), typeof(UniformSpacingPanel),
+ nameof(ItemHorizontalAlignment), typeof(HorizontalAlignment?), typeof(UniformSpacingPanel),
new FrameworkPropertyMetadata(HorizontalAlignment.Stretch, FrameworkPropertyMetadataOptions.AffectsMeasure));
public HorizontalAlignment? ItemHorizontalAlignment
@@ -107,7 +107,7 @@ public class UniformSpacingPanel : Panel
}
public static readonly DependencyProperty ItemVerticalAlignmentProperty = DependencyProperty.Register(
- "ItemVerticalAlignment", typeof(VerticalAlignment?), typeof(UniformSpacingPanel),
+ nameof(ItemVerticalAlignment), typeof(VerticalAlignment?), typeof(UniformSpacingPanel),
new FrameworkPropertyMetadata(VerticalAlignment.Stretch, FrameworkPropertyMetadataOptions.AffectsMeasure));
public VerticalAlignment? ItemVerticalAlignment
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/WaterfallPanel.cs b/src/Shared/HandyControl_Shared/Controls/Panel/WaterfallPanel.cs
index 59022afd..941ef8fd 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/WaterfallPanel.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/WaterfallPanel.cs
@@ -10,7 +10,7 @@ namespace HandyControl.Controls;
public class WaterfallPanel : Panel
{
public static readonly DependencyProperty GroupsProperty = DependencyProperty.Register(
- "Groups", typeof(int), typeof(WaterfallPanel), new FrameworkPropertyMetadata(
+ nameof(Groups), typeof(int), typeof(WaterfallPanel), new FrameworkPropertyMetadata(
ValueBoxes.Int2Box, FrameworkPropertyMetadataOptions.AffectsMeasure), IsGroupsValid);
public int Groups
@@ -22,7 +22,7 @@ public class WaterfallPanel : Panel
private static bool IsGroupsValid(object value) => (int) value >= 1;
public static readonly DependencyProperty AutoGroupProperty = DependencyProperty.Register(
- "AutoGroup", typeof(bool), typeof(WaterfallPanel), new FrameworkPropertyMetadata(
+ nameof(AutoGroup), typeof(bool), typeof(WaterfallPanel), new FrameworkPropertyMetadata(
ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsMeasure));
public bool AutoGroup
@@ -32,7 +32,7 @@ public class WaterfallPanel : Panel
}
public static readonly DependencyProperty DesiredLengthProperty = DependencyProperty.Register(
- "DesiredLength", typeof(double), typeof(WaterfallPanel), new FrameworkPropertyMetadata(ValueBoxes.Double0Box,
+ nameof(DesiredLength), typeof(double), typeof(WaterfallPanel), new FrameworkPropertyMetadata(ValueBoxes.Double0Box,
FrameworkPropertyMetadataOptions.AffectsMeasure), ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
public double DesiredLength
diff --git a/src/Shared/HandyControl_Shared/Controls/ProgressBar/CircleProgressBar.cs b/src/Shared/HandyControl_Shared/Controls/ProgressBar/CircleProgressBar.cs
index 0d953cc8..be0bea9e 100644
--- a/src/Shared/HandyControl_Shared/Controls/ProgressBar/CircleProgressBar.cs
+++ b/src/Shared/HandyControl_Shared/Controls/ProgressBar/CircleProgressBar.cs
@@ -12,13 +12,13 @@ public class CircleProgressBar : RangeBase
private const string IndicatorTemplateName = "PART_Indicator";
public static readonly DependencyProperty ArcThicknessProperty = DependencyProperty.Register(
- "ArcThickness", typeof(double), typeof(CircleProgressBar), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(ArcThickness), typeof(double), typeof(CircleProgressBar), new PropertyMetadata(ValueBoxes.Double0Box));
public static readonly DependencyProperty ShowTextProperty = DependencyProperty.Register(
- "ShowText", typeof(bool), typeof(CircleProgressBar), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowText), typeof(bool), typeof(CircleProgressBar), new PropertyMetadata(ValueBoxes.TrueBox));
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
- "Text", typeof(string), typeof(CircleProgressBar), new PropertyMetadata(default(string)));
+ nameof(Text), typeof(string), typeof(CircleProgressBar), new PropertyMetadata(default(string)));
public static readonly DependencyProperty IsIndeterminateProperty =
ProgressBar.IsIndeterminateProperty.AddOwner(typeof(CircleProgressBar),
diff --git a/src/Shared/HandyControl_Shared/Controls/ProgressBar/WaveProgressBar.cs b/src/Shared/HandyControl_Shared/Controls/ProgressBar/WaveProgressBar.cs
index 35e125a4..9c60b186 100644
--- a/src/Shared/HandyControl_Shared/Controls/ProgressBar/WaveProgressBar.cs
+++ b/src/Shared/HandyControl_Shared/Controls/ProgressBar/WaveProgressBar.cs
@@ -75,7 +75,7 @@ public class WaveProgressBar : RangeBase
}
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
- "Text", typeof(string), typeof(WaveProgressBar), new PropertyMetadata(default(string)));
+ nameof(Text), typeof(string), typeof(WaveProgressBar), new PropertyMetadata(default(string)));
public string Text
{
@@ -84,7 +84,7 @@ public class WaveProgressBar : RangeBase
}
public static readonly DependencyProperty ShowTextProperty = DependencyProperty.Register(
- "ShowText", typeof(bool), typeof(WaveProgressBar), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowText), typeof(bool), typeof(WaveProgressBar), new PropertyMetadata(ValueBoxes.TrueBox));
public bool ShowText
{
@@ -93,7 +93,7 @@ public class WaveProgressBar : RangeBase
}
public static readonly DependencyProperty WaveFillProperty = DependencyProperty.Register(
- "WaveFill", typeof(Brush), typeof(WaveProgressBar), new PropertyMetadata(default(Brush)));
+ nameof(WaveFill), typeof(Brush), typeof(WaveProgressBar), new PropertyMetadata(default(Brush)));
public Brush WaveFill
{
@@ -102,7 +102,7 @@ public class WaveProgressBar : RangeBase
}
public static readonly DependencyProperty WaveThicknessProperty = DependencyProperty.Register(
- "WaveThickness", typeof(double), typeof(WaveProgressBar), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(WaveThickness), typeof(double), typeof(WaveProgressBar), new PropertyMetadata(ValueBoxes.Double0Box));
public double WaveThickness
{
@@ -111,7 +111,7 @@ public class WaveProgressBar : RangeBase
}
public static readonly DependencyProperty WaveStrokeProperty = DependencyProperty.Register(
- "WaveStroke", typeof(Brush), typeof(WaveProgressBar), new PropertyMetadata(default(Brush)));
+ nameof(WaveStroke), typeof(Brush), typeof(WaveProgressBar), new PropertyMetadata(default(Brush)));
public Brush WaveStroke
{
diff --git a/src/Shared/HandyControl_Shared/Controls/PropertyGrid/Editors/ImagePropertyEditor.cs b/src/Shared/HandyControl_Shared/Controls/PropertyGrid/Editors/ImagePropertyEditor.cs
index 0bc1f3db..a1a168b0 100644
--- a/src/Shared/HandyControl_Shared/Controls/PropertyGrid/Editors/ImagePropertyEditor.cs
+++ b/src/Shared/HandyControl_Shared/Controls/PropertyGrid/Editors/ImagePropertyEditor.cs
@@ -28,7 +28,7 @@ public class ImagePropertyEditor : PropertyEditorBase
}
internal static readonly DependencyProperty UriProperty = DependencyProperty.Register(
- "Uri", typeof(Uri), typeof(ImagePropertyEditor), new PropertyMetadata(default(Uri), OnUriChangedCallback));
+ nameof(Uri), typeof(Uri), typeof(ImagePropertyEditor), new PropertyMetadata(default(Uri), OnUriChangedCallback));
private static void OnUriChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) =>
((ImagePropertyEditor) d).Source = e.NewValue is Uri uri ? BitmapFrame.Create(uri) : null;
@@ -40,7 +40,7 @@ public class ImagePropertyEditor : PropertyEditorBase
}
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
- "Source", typeof(ImageSource), typeof(ImagePropertyEditor), new PropertyMetadata(default(ImageSource)));
+ nameof(Source), typeof(ImageSource), typeof(ImagePropertyEditor), new PropertyMetadata(default(ImageSource)));
public ImageSource Source
{
diff --git a/src/Shared/HandyControl_Shared/Controls/PropertyGrid/PropertyGrid.cs b/src/Shared/HandyControl_Shared/Controls/PropertyGrid/PropertyGrid.cs
index 6ded8504..1f6365ce 100644
--- a/src/Shared/HandyControl_Shared/Controls/PropertyGrid/PropertyGrid.cs
+++ b/src/Shared/HandyControl_Shared/Controls/PropertyGrid/PropertyGrid.cs
@@ -46,7 +46,7 @@ public class PropertyGrid : Control
}
public static readonly DependencyProperty SelectedObjectProperty = DependencyProperty.Register(
- "SelectedObject", typeof(object), typeof(PropertyGrid), new PropertyMetadata(default, OnSelectedObjectChanged));
+ nameof(SelectedObject), typeof(object), typeof(PropertyGrid), new PropertyMetadata(default, OnSelectedObjectChanged));
private static void OnSelectedObjectChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -67,7 +67,7 @@ public class PropertyGrid : Control
}
public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register(
- "Description", typeof(string), typeof(PropertyGrid), new PropertyMetadata(default(string)));
+ nameof(Description), typeof(string), typeof(PropertyGrid), new PropertyMetadata(default(string)));
public string Description
{
@@ -76,7 +76,7 @@ public class PropertyGrid : Control
}
public static readonly DependencyProperty MaxTitleWidthProperty = DependencyProperty.Register(
- "MaxTitleWidth", typeof(double), typeof(PropertyGrid), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(MaxTitleWidth), typeof(double), typeof(PropertyGrid), new PropertyMetadata(ValueBoxes.Double0Box));
public double MaxTitleWidth
{
@@ -85,7 +85,7 @@ public class PropertyGrid : Control
}
public static readonly DependencyProperty MinTitleWidthProperty = DependencyProperty.Register(
- "MinTitleWidth", typeof(double), typeof(PropertyGrid), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(MinTitleWidth), typeof(double), typeof(PropertyGrid), new PropertyMetadata(ValueBoxes.Double0Box));
public double MinTitleWidth
{
@@ -94,7 +94,7 @@ public class PropertyGrid : Control
}
public static readonly DependencyProperty ShowSortButtonProperty = DependencyProperty.Register(
- "ShowSortButton", typeof(bool), typeof(PropertyGrid), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowSortButton), typeof(bool), typeof(PropertyGrid), new PropertyMetadata(ValueBoxes.TrueBox));
public bool ShowSortButton
{
diff --git a/src/Shared/HandyControl_Shared/Controls/PropertyGrid/PropertyItem.cs b/src/Shared/HandyControl_Shared/Controls/PropertyGrid/PropertyItem.cs
index c4efcfcd..658e31c8 100644
--- a/src/Shared/HandyControl_Shared/Controls/PropertyGrid/PropertyItem.cs
+++ b/src/Shared/HandyControl_Shared/Controls/PropertyGrid/PropertyItem.cs
@@ -9,7 +9,7 @@ namespace HandyControl.Controls;
public class PropertyItem : ListBoxItem
{
public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
- "Value", typeof(object), typeof(PropertyItem), new PropertyMetadata(default(object)));
+ nameof(Value), typeof(object), typeof(PropertyItem), new PropertyMetadata(default(object)));
public object Value
{
@@ -18,7 +18,7 @@ public class PropertyItem : ListBoxItem
}
public static readonly DependencyProperty DisplayNameProperty = DependencyProperty.Register(
- "DisplayName", typeof(string), typeof(PropertyItem), new PropertyMetadata(default(string)));
+ nameof(DisplayName), typeof(string), typeof(PropertyItem), new PropertyMetadata(default(string)));
public string DisplayName
{
@@ -27,7 +27,7 @@ public class PropertyItem : ListBoxItem
}
public static readonly DependencyProperty PropertyNameProperty = DependencyProperty.Register(
- "PropertyName", typeof(string), typeof(PropertyItem), new PropertyMetadata(default(string)));
+ nameof(PropertyName), typeof(string), typeof(PropertyItem), new PropertyMetadata(default(string)));
public string PropertyName
{
@@ -36,7 +36,7 @@ public class PropertyItem : ListBoxItem
}
public static readonly DependencyProperty PropertyTypeProperty = DependencyProperty.Register(
- "PropertyType", typeof(Type), typeof(PropertyItem), new PropertyMetadata(default(Type)));
+ nameof(PropertyType), typeof(Type), typeof(PropertyItem), new PropertyMetadata(default(Type)));
public Type PropertyType
{
@@ -45,7 +45,7 @@ public class PropertyItem : ListBoxItem
}
public static readonly DependencyProperty PropertyTypeNameProperty = DependencyProperty.Register(
- "PropertyTypeName", typeof(string), typeof(PropertyItem), new PropertyMetadata(default(string)));
+ nameof(PropertyTypeName), typeof(string), typeof(PropertyItem), new PropertyMetadata(default(string)));
public string PropertyTypeName
{
@@ -54,7 +54,7 @@ public class PropertyItem : ListBoxItem
}
public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register(
- "Description", typeof(string), typeof(PropertyItem), new PropertyMetadata(default(string)));
+ nameof(Description), typeof(string), typeof(PropertyItem), new PropertyMetadata(default(string)));
public string Description
{
@@ -63,7 +63,7 @@ public class PropertyItem : ListBoxItem
}
public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register(
- "IsReadOnly", typeof(bool), typeof(PropertyItem), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsReadOnly), typeof(bool), typeof(PropertyItem), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsReadOnly
{
@@ -72,7 +72,7 @@ public class PropertyItem : ListBoxItem
}
public static readonly DependencyProperty DefaultValueProperty = DependencyProperty.Register(
- "DefaultValue", typeof(object), typeof(PropertyItem), new PropertyMetadata(default(object)));
+ nameof(DefaultValue), typeof(object), typeof(PropertyItem), new PropertyMetadata(default(object)));
public object DefaultValue
{
@@ -81,7 +81,7 @@ public class PropertyItem : ListBoxItem
}
public static readonly DependencyProperty CategoryProperty = DependencyProperty.Register(
- "Category", typeof(string), typeof(PropertyItem), new PropertyMetadata(default(string)));
+ nameof(Category), typeof(string), typeof(PropertyItem), new PropertyMetadata(default(string)));
public string Category
{
@@ -90,7 +90,7 @@ public class PropertyItem : ListBoxItem
}
public static readonly DependencyProperty EditorProperty = DependencyProperty.Register(
- "Editor", typeof(PropertyEditorBase), typeof(PropertyItem), new PropertyMetadata(default(PropertyEditorBase)));
+ nameof(Editor), typeof(PropertyEditorBase), typeof(PropertyItem), new PropertyMetadata(default(PropertyEditorBase)));
public PropertyEditorBase Editor
{
@@ -99,7 +99,7 @@ public class PropertyItem : ListBoxItem
}
public static readonly DependencyProperty EditorElementProperty = DependencyProperty.Register(
- "EditorElement", typeof(FrameworkElement), typeof(PropertyItem), new PropertyMetadata(default(FrameworkElement)));
+ nameof(EditorElement), typeof(FrameworkElement), typeof(PropertyItem), new PropertyMetadata(default(FrameworkElement)));
public FrameworkElement EditorElement
{
@@ -108,7 +108,7 @@ public class PropertyItem : ListBoxItem
}
public static readonly DependencyProperty IsExpandedEnabledProperty = DependencyProperty.Register(
- "IsExpandedEnabled", typeof(bool), typeof(PropertyItem), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsExpandedEnabled), typeof(bool), typeof(PropertyItem), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsExpandedEnabled
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Rate/Rate.cs b/src/Shared/HandyControl_Shared/Controls/Rate/Rate.cs
index d43f3565..99591df9 100644
--- a/src/Shared/HandyControl_Shared/Controls/Rate/Rate.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Rate/Rate.cs
@@ -17,22 +17,22 @@ public class Rate : RegularItemsControl
}
public static readonly DependencyProperty AllowHalfProperty = DependencyProperty.Register(
- "AllowHalf", typeof(bool), typeof(Rate), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits));
+ nameof(AllowHalf), typeof(bool), typeof(Rate), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits));
public static readonly DependencyProperty AllowClearProperty = DependencyProperty.Register(
- "AllowClear", typeof(bool), typeof(Rate), new FrameworkPropertyMetadata(ValueBoxes.TrueBox, FrameworkPropertyMetadataOptions.Inherits));
+ nameof(AllowClear), typeof(bool), typeof(Rate), new FrameworkPropertyMetadata(ValueBoxes.TrueBox, FrameworkPropertyMetadataOptions.Inherits));
public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
- "Icon", typeof(Geometry), typeof(Rate), new FrameworkPropertyMetadata(default(Geometry), FrameworkPropertyMetadataOptions.Inherits));
+ nameof(Icon), typeof(Geometry), typeof(Rate), new FrameworkPropertyMetadata(default(Geometry), FrameworkPropertyMetadataOptions.Inherits));
public static readonly DependencyProperty CountProperty = DependencyProperty.Register(
- "Count", typeof(int), typeof(Rate), new PropertyMetadata(ValueBoxes.Int5Box));
+ nameof(Count), typeof(int), typeof(Rate), new PropertyMetadata(ValueBoxes.Int5Box));
public static readonly DependencyProperty DefaultValueProperty = DependencyProperty.Register(
- "DefaultValue", typeof(double), typeof(Rate), new PropertyMetadata(ValueBoxes.Double0Box));
+ nameof(DefaultValue), typeof(double), typeof(Rate), new PropertyMetadata(ValueBoxes.Double0Box));
public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
- "Value", typeof(double), typeof(Rate), new PropertyMetadata(ValueBoxes.Double0Box, OnValueChanged));
+ nameof(Value), typeof(double), typeof(Rate), new PropertyMetadata(ValueBoxes.Double0Box, OnValueChanged));
private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) =>
((Rate) d).OnValueChanged(new FunctionEventArgs(ValueChangedEvent, d)
@@ -47,13 +47,13 @@ public class Rate : RegularItemsControl
}
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
- "Text", typeof(string), typeof(Rate), new PropertyMetadata(default(string)));
+ nameof(Text), typeof(string), typeof(Rate), new PropertyMetadata(default(string)));
public static readonly DependencyProperty ShowTextProperty = DependencyProperty.Register(
- "ShowText", typeof(bool), typeof(Rate), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowText), typeof(bool), typeof(Rate), new PropertyMetadata(ValueBoxes.FalseBox));
public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register(
- "IsReadOnly", typeof(bool), typeof(Rate), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsReadOnly), typeof(bool), typeof(Rate), new PropertyMetadata(ValueBoxes.FalseBox));
private bool _isLoaded;
diff --git a/src/Shared/HandyControl_Shared/Controls/Rate/RateItem.cs b/src/Shared/HandyControl_Shared/Controls/Rate/RateItem.cs
index 002fff7b..55a587b0 100644
--- a/src/Shared/HandyControl_Shared/Controls/Rate/RateItem.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Rate/RateItem.cs
@@ -23,7 +23,7 @@ public class RateItem : Control
public static readonly DependencyProperty IsReadOnlyProperty = Rate.IsReadOnlyProperty.AddOwner(typeof(RateItem));
internal static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(
- "IsSelected", typeof(bool), typeof(RateItem),
+ nameof(IsSelected), typeof(bool), typeof(RateItem),
new PropertyMetadata(ValueBoxes.FalseBox, OnIsSelectedChanged));
public static readonly RoutedEvent SelectedChangedEvent =
diff --git a/src/Shared/HandyControl_Shared/Controls/Ribbon/Ribbon.cs b/src/Shared/HandyControl_Shared/Controls/Ribbon/Ribbon.cs
index 29439d86..47c4ad34 100644
--- a/src/Shared/HandyControl_Shared/Controls/Ribbon/Ribbon.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Ribbon/Ribbon.cs
@@ -59,7 +59,7 @@ namespace HandyControl.Controls
=> (Ribbon) element.GetValue(RibbonProperty);
public static readonly DependencyProperty IsDropDownOpenProperty = DependencyProperty.Register(
- "IsDropDownOpen", typeof(bool), typeof(Ribbon), new PropertyMetadata(ValueBoxes.TrueBox, OnIsDropDownOpenChanged));
+ nameof(IsDropDownOpen), typeof(bool), typeof(Ribbon), new PropertyMetadata(ValueBoxes.TrueBox, OnIsDropDownOpenChanged));
private static void OnIsDropDownOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -84,7 +84,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty IsMinimizedProperty = DependencyProperty.Register(
- "IsMinimized", typeof(bool), typeof(Ribbon), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsMinimized), typeof(bool), typeof(Ribbon), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsMinimized
{
@@ -93,7 +93,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty ContentHeightProperty = DependencyProperty.Register(
- "ContentHeight", typeof(double), typeof(Ribbon), new PropertyMetadata(default(double)));
+ nameof(ContentHeight), typeof(double), typeof(Ribbon), new PropertyMetadata(default(double)));
public double ContentHeight
{
@@ -102,7 +102,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty PrefixContentProperty = DependencyProperty.Register(
- "PrefixContent", typeof(object), typeof(Ribbon), new PropertyMetadata(default(object)));
+ nameof(PrefixContent), typeof(object), typeof(Ribbon), new PropertyMetadata(default(object)));
public object PrefixContent
{
@@ -111,7 +111,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty PostfixContentProperty = DependencyProperty.Register(
- "PostfixContent", typeof(object), typeof(Ribbon), new PropertyMetadata(default(object)));
+ nameof(PostfixContent), typeof(object), typeof(Ribbon), new PropertyMetadata(default(object)));
public object PostfixContent
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Ribbon/RibbonGroup.cs b/src/Shared/HandyControl_Shared/Controls/Ribbon/RibbonGroup.cs
index e19240ff..ec6f7b8b 100644
--- a/src/Shared/HandyControl_Shared/Controls/Ribbon/RibbonGroup.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Ribbon/RibbonGroup.cs
@@ -19,7 +19,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty ShowLauncherButtonProperty = DependencyProperty.Register(
- "ShowLauncherButton", typeof(bool), typeof(RibbonGroup), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowLauncherButton), typeof(bool), typeof(RibbonGroup), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowLauncherButton
{
@@ -28,7 +28,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty ShowSplitterProperty = DependencyProperty.Register(
- "ShowSplitter", typeof(bool), typeof(RibbonGroup), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowSplitter), typeof(bool), typeof(RibbonGroup), new PropertyMetadata(ValueBoxes.TrueBox));
public bool ShowSplitter
{
@@ -37,7 +37,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty LauncherPoptipProperty = DependencyProperty.Register(
- "LauncherPoptip", typeof(Poptip), typeof(RibbonGroup), new PropertyMetadata(default(Poptip)));
+ nameof(LauncherPoptip), typeof(Poptip), typeof(RibbonGroup), new PropertyMetadata(default(Poptip)));
public Poptip LauncherPoptip
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Ribbon/RibbonTabHeader.cs b/src/Shared/HandyControl_Shared/Controls/Ribbon/RibbonTabHeader.cs
index 2c18e952..6959eaf9 100644
--- a/src/Shared/HandyControl_Shared/Controls/Ribbon/RibbonTabHeader.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Ribbon/RibbonTabHeader.cs
@@ -31,7 +31,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(
- "IsSelected", typeof(bool), typeof(RibbonTabHeader),
+ nameof(IsSelected), typeof(bool), typeof(RibbonTabHeader),
new PropertyMetadata(ValueBoxes.FalseBox, OnIsSelectedChanged, CoerceIsSelected));
private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
diff --git a/src/Shared/HandyControl_Shared/Controls/Screenshot/ScreenshotWindow.cs b/src/Shared/HandyControl_Shared/Controls/Screenshot/ScreenshotWindow.cs
index fcb6e09a..f4fe1b72 100644
--- a/src/Shared/HandyControl_Shared/Controls/Screenshot/ScreenshotWindow.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Screenshot/ScreenshotWindow.cs
@@ -120,7 +120,7 @@ public class ScreenshotWindow : System.Windows.Window
#region prop
public static readonly DependencyProperty IsDrawingProperty = DependencyProperty.Register(
- "IsDrawing", typeof(bool), typeof(ScreenshotWindow), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsDrawing), typeof(bool), typeof(ScreenshotWindow), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsDrawing
{
@@ -129,7 +129,7 @@ public class ScreenshotWindow : System.Windows.Window
}
public static readonly DependencyProperty IsSelectingProperty = DependencyProperty.Register(
- "IsSelecting", typeof(bool), typeof(ScreenshotWindow), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsSelecting), typeof(bool), typeof(ScreenshotWindow), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsSelecting
{
@@ -138,7 +138,7 @@ public class ScreenshotWindow : System.Windows.Window
}
public static readonly DependencyProperty SizeProperty = DependencyProperty.Register(
- "Size", typeof(Size), typeof(ScreenshotWindow), new PropertyMetadata(default(Size)));
+ nameof(Size), typeof(Size), typeof(ScreenshotWindow), new PropertyMetadata(default(Size)));
public Size Size
{
@@ -147,7 +147,7 @@ public class ScreenshotWindow : System.Windows.Window
}
public static readonly DependencyProperty SizeStrProperty = DependencyProperty.Register(
- "SizeStr", typeof(string), typeof(ScreenshotWindow), new PropertyMetadata(default(string)));
+ nameof(SizeStr), typeof(string), typeof(ScreenshotWindow), new PropertyMetadata(default(string)));
public string SizeStr
{
@@ -156,7 +156,7 @@ public class ScreenshotWindow : System.Windows.Window
}
public static readonly DependencyProperty PixelColorProperty = DependencyProperty.Register(
- "PixelColor", typeof(Color), typeof(ScreenshotWindow), new PropertyMetadata(default(Color)));
+ nameof(PixelColor), typeof(Color), typeof(ScreenshotWindow), new PropertyMetadata(default(Color)));
public Color PixelColor
{
@@ -165,7 +165,7 @@ public class ScreenshotWindow : System.Windows.Window
}
public static readonly DependencyProperty PixelColorStrProperty = DependencyProperty.Register(
- "PixelColorStr", typeof(string), typeof(ScreenshotWindow), new PropertyMetadata(default(string)));
+ nameof(PixelColorStr), typeof(string), typeof(ScreenshotWindow), new PropertyMetadata(default(string)));
public string PixelColorStr
{
diff --git a/src/Shared/HandyControl_Shared/Controls/SideMenu/SideMenu.cs b/src/Shared/HandyControl_Shared/Controls/SideMenu/SideMenu.cs
index bda1b585..31d0bb4b 100644
--- a/src/Shared/HandyControl_Shared/Controls/SideMenu/SideMenu.cs
+++ b/src/Shared/HandyControl_Shared/Controls/SideMenu/SideMenu.cs
@@ -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
{
diff --git a/src/Shared/HandyControl_Shared/Controls/SideMenu/SideMenuItem.cs b/src/Shared/HandyControl_Shared/Controls/SideMenu/SideMenuItem.cs
index f821057b..66c57b5d 100644
--- a/src/Shared/HandyControl_Shared/Controls/SideMenu/SideMenuItem.cs
+++ b/src/Shared/HandyControl_Shared/Controls/SideMenu/SideMenuItem.cs
@@ -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
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Slider/CompareSlider/CompareSlider.cs b/src/Shared/HandyControl_Shared/Controls/Slider/CompareSlider/CompareSlider.cs
index ced5334f..34d6b119 100644
--- a/src/Shared/HandyControl_Shared/Controls/Slider/CompareSlider/CompareSlider.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Slider/CompareSlider/CompareSlider.cs
@@ -6,10 +6,10 @@ namespace HandyControl.Controls;
public class CompareSlider : Slider
{
public static readonly DependencyProperty TargetContentProperty = DependencyProperty.Register(
- "TargetContent", typeof(object), typeof(CompareSlider), new PropertyMetadata(default(object)));
+ nameof(TargetContent), typeof(object), typeof(CompareSlider), new PropertyMetadata(default(object)));
public static readonly DependencyProperty SourceContentProperty = DependencyProperty.Register(
- "SourceContent", typeof(object), typeof(CompareSlider), new PropertyMetadata(default(object)));
+ nameof(SourceContent), typeof(object), typeof(CompareSlider), new PropertyMetadata(default(object)));
public object TargetContent
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Slider/PreviewSlider.cs b/src/Shared/HandyControl_Shared/Controls/Slider/PreviewSlider.cs
index 6eaa6b17..a2cb6c9d 100644
--- a/src/Shared/HandyControl_Shared/Controls/Slider/PreviewSlider.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Slider/PreviewSlider.cs
@@ -33,7 +33,7 @@ public class PreviewSlider : Slider
/// 预览内容
///
public static readonly DependencyProperty PreviewContentProperty = DependencyProperty.Register(
- "PreviewContent", typeof(object), typeof(PreviewSlider), new PropertyMetadata(default(object)));
+ nameof(PreviewContent), typeof(object), typeof(PreviewSlider), new PropertyMetadata(default(object)));
///
/// 预览内容
@@ -45,7 +45,7 @@ public class PreviewSlider : Slider
}
public static readonly DependencyProperty PreviewContentOffsetProperty = DependencyProperty.Register(
- "PreviewContentOffset", typeof(double), typeof(PreviewSlider), new PropertyMetadata(9.0));
+ nameof(PreviewContentOffset), typeof(double), typeof(PreviewSlider), new PropertyMetadata(9.0));
public double PreviewContentOffset
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeSlider.cs b/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeSlider.cs
index 2824981e..33b7a4ea 100644
--- a/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeSlider.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeSlider.cs
@@ -132,7 +132,7 @@ public class RangeSlider : TwoWayRangeBase
}
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
- "Orientation", typeof(Orientation), typeof(RangeSlider), new PropertyMetadata(default(Orientation)));
+ nameof(Orientation), typeof(Orientation), typeof(RangeSlider), new PropertyMetadata(default(Orientation)));
public Orientation Orientation
{
@@ -141,7 +141,7 @@ public class RangeSlider : TwoWayRangeBase
}
public static readonly DependencyProperty IsDirectionReversedProperty = DependencyProperty.Register(
- "IsDirectionReversed", typeof(bool), typeof(RangeSlider), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsDirectionReversed), typeof(bool), typeof(RangeSlider), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsDirectionReversed
{
@@ -182,7 +182,7 @@ public class RangeSlider : TwoWayRangeBase
}
public static readonly DependencyProperty AutoToolTipPlacementProperty = DependencyProperty.Register(
- "AutoToolTipPlacement", typeof(AutoToolTipPlacement), typeof(RangeSlider), new PropertyMetadata(default(AutoToolTipPlacement)));
+ nameof(AutoToolTipPlacement), typeof(AutoToolTipPlacement), typeof(RangeSlider), new PropertyMetadata(default(AutoToolTipPlacement)));
public AutoToolTipPlacement AutoToolTipPlacement
{
@@ -191,7 +191,7 @@ public class RangeSlider : TwoWayRangeBase
}
public static readonly DependencyProperty AutoToolTipPrecisionProperty = DependencyProperty.Register(
- "AutoToolTipPrecision", typeof(int), typeof(RangeSlider), new PropertyMetadata(ValueBoxes.Int0Box),
+ nameof(AutoToolTipPrecision), typeof(int), typeof(RangeSlider), new PropertyMetadata(ValueBoxes.Int0Box),
ValidateHelper.IsInRangeOfPosIntIncludeZero);
public int AutoToolTipPrecision
@@ -201,7 +201,7 @@ public class RangeSlider : TwoWayRangeBase
}
public static readonly DependencyProperty IsSnapToTickEnabledProperty = DependencyProperty.Register(
- "IsSnapToTickEnabled", typeof(bool), typeof(RangeSlider), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsSnapToTickEnabled), typeof(bool), typeof(RangeSlider), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsSnapToTickEnabled
{
@@ -210,7 +210,7 @@ public class RangeSlider : TwoWayRangeBase
}
public static readonly DependencyProperty TickPlacementProperty = DependencyProperty.Register(
- "TickPlacement", typeof(TickPlacement), typeof(RangeSlider), new PropertyMetadata(default(TickPlacement)));
+ nameof(TickPlacement), typeof(TickPlacement), typeof(RangeSlider), new PropertyMetadata(default(TickPlacement)));
public TickPlacement TickPlacement
{
@@ -219,7 +219,7 @@ public class RangeSlider : TwoWayRangeBase
}
public static readonly DependencyProperty TickFrequencyProperty = DependencyProperty.Register(
- "TickFrequency", typeof(double), typeof(RangeSlider), new PropertyMetadata(ValueBoxes.Double1Box),
+ nameof(TickFrequency), typeof(double), typeof(RangeSlider), new PropertyMetadata(ValueBoxes.Double1Box),
ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
public double TickFrequency
@@ -229,7 +229,7 @@ public class RangeSlider : TwoWayRangeBase
}
public static readonly DependencyProperty TicksProperty = DependencyProperty.Register(
- "Ticks", typeof(DoubleCollection), typeof(RangeSlider), new PropertyMetadata(new DoubleCollection()));
+ nameof(Ticks), typeof(DoubleCollection), typeof(RangeSlider), new PropertyMetadata(new DoubleCollection()));
public DoubleCollection Ticks
{
@@ -238,7 +238,7 @@ public class RangeSlider : TwoWayRangeBase
}
public static readonly DependencyProperty IsMoveToPointEnabledProperty = DependencyProperty.Register(
- "IsMoveToPointEnabled", typeof(bool), typeof(RangeSlider), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsMoveToPointEnabled), typeof(bool), typeof(RangeSlider), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsMoveToPointEnabled
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeThumb.cs b/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeThumb.cs
index 0f76dfa6..ab846458 100644
--- a/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeThumb.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeThumb.cs
@@ -8,7 +8,7 @@ namespace HandyControl.Controls;
public class RangeThumb : Thumb
{
public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(
- "Content", typeof(object), typeof(RangeThumb), new PropertyMetadata(default(object)));
+ nameof(Content), typeof(object), typeof(RangeThumb), new PropertyMetadata(default(object)));
public object Content
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeTrack.cs b/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeTrack.cs
index 2b951b4e..a9dba720 100644
--- a/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeTrack.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/RangeTrack.cs
@@ -109,7 +109,7 @@ public class RangeTrack : FrameworkElement
}
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
- "Orientation", typeof(Orientation), typeof(RangeTrack),
+ nameof(Orientation), typeof(Orientation), typeof(RangeTrack),
new FrameworkPropertyMetadata(default(Orientation), FrameworkPropertyMetadataOptions.AffectsMeasure));
public Orientation Orientation
@@ -119,7 +119,7 @@ public class RangeTrack : FrameworkElement
}
public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register(
- "Minimum", typeof(double), typeof(RangeTrack),
+ nameof(Minimum), typeof(double), typeof(RangeTrack),
new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.AffectsArrange));
public double Minimum
@@ -129,7 +129,7 @@ public class RangeTrack : FrameworkElement
}
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
- "Maximum", typeof(double), typeof(RangeTrack),
+ nameof(Maximum), typeof(double), typeof(RangeTrack),
new FrameworkPropertyMetadata(ValueBoxes.Double1Box, FrameworkPropertyMetadataOptions.AffectsArrange));
public double Maximum
@@ -139,7 +139,7 @@ public class RangeTrack : FrameworkElement
}
public static readonly DependencyProperty ValueStartProperty = DependencyProperty.Register(
- "ValueStart", typeof(double), typeof(RangeTrack),
+ nameof(ValueStart), typeof(double), typeof(RangeTrack),
new FrameworkPropertyMetadata(ValueBoxes.Double0Box,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault |
FrameworkPropertyMetadataOptions.AffectsArrange));
@@ -151,7 +151,7 @@ public class RangeTrack : FrameworkElement
}
public static readonly DependencyProperty ValueEndProperty = DependencyProperty.Register(
- "ValueEnd", typeof(double), typeof(RangeTrack),
+ nameof(ValueEnd), typeof(double), typeof(RangeTrack),
new FrameworkPropertyMetadata(ValueBoxes.Double0Box,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault |
FrameworkPropertyMetadataOptions.AffectsArrange));
@@ -163,7 +163,7 @@ public class RangeTrack : FrameworkElement
}
public static readonly DependencyProperty IsDirectionReversedProperty = DependencyProperty.Register(
- "IsDirectionReversed", typeof(bool), typeof(RangeTrack), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsDirectionReversed), typeof(bool), typeof(RangeTrack), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsDirectionReversed
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/TwoWayRangeBase.cs b/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/TwoWayRangeBase.cs
index beca31ca..ddd6dba6 100644
--- a/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/TwoWayRangeBase.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Slider/RangeSlider/TwoWayRangeBase.cs
@@ -10,7 +10,7 @@ namespace HandyControl.Controls;
public class TwoWayRangeBase : Control
{
public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register(
- "Minimum", typeof(double), typeof(TwoWayRangeBase),
+ nameof(Minimum), typeof(double), typeof(TwoWayRangeBase),
new PropertyMetadata(ValueBoxes.Double0Box, OnMinimumChanged), ValidateHelper.IsInRangeOfDouble);
private static void OnMinimumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
@@ -34,7 +34,7 @@ public class TwoWayRangeBase : Control
}
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
- "Maximum", typeof(double), typeof(TwoWayRangeBase),
+ nameof(Maximum), typeof(double), typeof(TwoWayRangeBase),
new PropertyMetadata(ValueBoxes.Double10Box, OnMaximumChanged, CoerceMaximum),
ValidateHelper.IsInRangeOfDouble);
@@ -69,7 +69,7 @@ public class TwoWayRangeBase : Control
}
public static readonly DependencyProperty ValueStartProperty = DependencyProperty.Register(
- "ValueStart", typeof(double), typeof(TwoWayRangeBase),
+ nameof(ValueStart), typeof(double), typeof(TwoWayRangeBase),
new FrameworkPropertyMetadata(ValueBoxes.Double0Box,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault | FrameworkPropertyMetadataOptions.Journal,
OnValueStartChanged, ConstrainToRange), ValidateHelper.IsInRangeOfDouble);
@@ -98,7 +98,7 @@ public class TwoWayRangeBase : Control
}
public static readonly DependencyProperty ValueEndProperty = DependencyProperty.Register(
- "ValueEnd", typeof(double), typeof(TwoWayRangeBase),
+ nameof(ValueEnd), typeof(double), typeof(TwoWayRangeBase),
new FrameworkPropertyMetadata(ValueBoxes.Double0Box,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault | FrameworkPropertyMetadataOptions.Journal,
OnValueEndChanged, ConstrainToRange), ValidateHelper.IsInRangeOfDouble);
@@ -143,7 +143,7 @@ public class TwoWayRangeBase : Control
}
public static readonly DependencyProperty LargeChangeProperty = DependencyProperty.Register(
- "LargeChange", typeof(double), typeof(TwoWayRangeBase), new PropertyMetadata(ValueBoxes.Double1Box),
+ nameof(LargeChange), typeof(double), typeof(TwoWayRangeBase), new PropertyMetadata(ValueBoxes.Double1Box),
ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
public double LargeChange
@@ -153,7 +153,7 @@ public class TwoWayRangeBase : Control
}
public static readonly DependencyProperty SmallChangeProperty = DependencyProperty.Register(
- "SmallChange", typeof(double), typeof(TwoWayRangeBase), new PropertyMetadata(ValueBoxes.Double01Box),
+ nameof(SmallChange), typeof(double), typeof(TwoWayRangeBase), new PropertyMetadata(ValueBoxes.Double01Box),
ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
public double SmallChange
diff --git a/src/Shared/HandyControl_Shared/Controls/StepBar/StepBar.cs b/src/Shared/HandyControl_Shared/Controls/StepBar/StepBar.cs
index 8978140c..d38b8c53 100644
--- a/src/Shared/HandyControl_Shared/Controls/StepBar/StepBar.cs
+++ b/src/Shared/HandyControl_Shared/Controls/StepBar/StepBar.cs
@@ -97,7 +97,7 @@ public class StepBar : ItemsControl
}
public static readonly DependencyProperty StepIndexProperty = DependencyProperty.Register(
- "StepIndex", typeof(int), typeof(StepBar), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
+ nameof(StepIndex), typeof(int), typeof(StepBar), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnStepIndexChanged, CoerceStepIndex));
private static object CoerceStepIndex(DependencyObject d, object basevalue)
@@ -158,7 +158,7 @@ public class StepBar : ItemsControl
}
public static readonly DependencyProperty DockProperty = DependencyProperty.Register(
- "Dock", typeof(Dock), typeof(StepBar), new PropertyMetadata(Dock.Top));
+ nameof(Dock), typeof(Dock), typeof(StepBar), new PropertyMetadata(Dock.Top));
public Dock Dock
{
@@ -167,7 +167,7 @@ public class StepBar : ItemsControl
}
public static readonly DependencyProperty IsMouseSelectableProperty = DependencyProperty.Register(
- "IsMouseSelectable", typeof(bool), typeof(StepBar), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsMouseSelectable), typeof(bool), typeof(StepBar), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsMouseSelectable
{
diff --git a/src/Shared/HandyControl_Shared/Controls/StepBar/StepBarItem.cs b/src/Shared/HandyControl_Shared/Controls/StepBar/StepBarItem.cs
index b3a8d516..76c0c4c6 100644
--- a/src/Shared/HandyControl_Shared/Controls/StepBar/StepBarItem.cs
+++ b/src/Shared/HandyControl_Shared/Controls/StepBar/StepBarItem.cs
@@ -12,7 +12,7 @@ public class StepBarItem : SelectableItem
/// 步骤编号
///
public static readonly DependencyProperty IndexProperty = DependencyProperty.Register(
- "Index", typeof(int), typeof(StepBarItem), new PropertyMetadata(-1));
+ nameof(Index), typeof(int), typeof(StepBarItem), new PropertyMetadata(-1));
///
/// 步骤编号
@@ -27,7 +27,7 @@ public class StepBarItem : SelectableItem
/// 步骤状态
///
public static readonly DependencyProperty StatusProperty = DependencyProperty.Register(
- "Status", typeof(StepStatus), typeof(StepBarItem), new PropertyMetadata(StepStatus.Waiting));
+ nameof(Status), typeof(StepStatus), typeof(StepBarItem), new PropertyMetadata(StepStatus.Waiting));
///
/// 步骤状态
diff --git a/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs b/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs
index 4d63d36f..909e8aa2 100644
--- a/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs
+++ b/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs
@@ -52,7 +52,7 @@ public class TabControl : System.Windows.Controls.TabControl
/// 是否启用动画
///
public static readonly DependencyProperty IsAnimationEnabledProperty = DependencyProperty.Register(
- "IsAnimationEnabled", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsAnimationEnabled), typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否启用动画
@@ -67,7 +67,7 @@ public class TabControl : System.Windows.Controls.TabControl
/// 是否可以拖动
///
public static readonly DependencyProperty IsDraggableProperty = DependencyProperty.Register(
- "IsDraggable", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsDraggable), typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否可以拖动
@@ -121,7 +121,7 @@ public class TabControl : System.Windows.Controls.TabControl
}
public static readonly DependencyProperty CanBeClosedByMiddleButtonProperty =
- DependencyProperty.Register("CanBeClosedByMiddleButton", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.TrueBox));
+ DependencyProperty.Register(nameof(CanBeClosedByMiddleButton), typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.TrueBox));
public bool CanBeClosedByMiddleButton
{
@@ -133,7 +133,7 @@ public class TabControl : System.Windows.Controls.TabControl
/// 是否将标签填充
///
public static readonly DependencyProperty IsTabFillEnabledProperty = DependencyProperty.Register(
- "IsTabFillEnabled", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsTabFillEnabled), typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否将标签填充
@@ -148,7 +148,7 @@ public class TabControl : System.Windows.Controls.TabControl
/// 标签宽度
///
public static readonly DependencyProperty TabItemWidthProperty = DependencyProperty.Register(
- "TabItemWidth", typeof(double), typeof(TabControl), new PropertyMetadata(200.0));
+ nameof(TabItemWidth), typeof(double), typeof(TabControl), new PropertyMetadata(200.0));
///
/// 标签宽度
@@ -163,7 +163,7 @@ public class TabControl : System.Windows.Controls.TabControl
/// 标签高度
///
public static readonly DependencyProperty TabItemHeightProperty = DependencyProperty.Register(
- "TabItemHeight", typeof(double), typeof(TabControl), new PropertyMetadata(30.0));
+ nameof(TabItemHeight), typeof(double), typeof(TabControl), new PropertyMetadata(30.0));
///
/// 标签高度
@@ -178,7 +178,7 @@ public class TabControl : System.Windows.Controls.TabControl
/// 是否可以滚动
///
public static readonly DependencyProperty IsScrollableProperty = DependencyProperty.Register(
- "IsScrollable", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsScrollable), typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否可以滚动
@@ -193,7 +193,7 @@ public class TabControl : System.Windows.Controls.TabControl
/// 是否显示溢出按钮
///
public static readonly DependencyProperty ShowOverflowButtonProperty = DependencyProperty.Register(
- "ShowOverflowButton", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowOverflowButton), typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.TrueBox));
///
/// 是否显示溢出按钮
@@ -208,7 +208,7 @@ public class TabControl : System.Windows.Controls.TabControl
/// 是否显示滚动按钮
///
public static readonly DependencyProperty ShowScrollButtonProperty = DependencyProperty.Register(
- "ShowScrollButton", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowScrollButton), typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否显示滚动按钮
diff --git a/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs b/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs
index 1f1cd33b..d202527c 100644
--- a/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs
+++ b/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs
@@ -183,7 +183,7 @@ public class TabItem : System.Windows.Controls.TabItem
=> (bool) element.GetValue(ShowContextMenuProperty);
public static readonly DependencyProperty MenuProperty = DependencyProperty.Register(
- "Menu", typeof(ContextMenu), typeof(TabItem), new PropertyMetadata(default(ContextMenu), OnMenuChanged));
+ nameof(Menu), typeof(ContextMenu), typeof(TabItem), new PropertyMetadata(default(ContextMenu), OnMenuChanged));
private static void OnMenuChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/TabControl/TabPanel.cs b/src/Shared/HandyControl_Shared/Controls/TabControl/TabPanel.cs
index a3d5b1ed..2fe1e300 100644
--- a/src/Shared/HandyControl_Shared/Controls/TabControl/TabPanel.cs
+++ b/src/Shared/HandyControl_Shared/Controls/TabControl/TabPanel.cs
@@ -45,7 +45,7 @@ public class TabPanel : Panel
/// 是否将标签填充
///
public static readonly DependencyProperty IsTabFillEnabledProperty = DependencyProperty.Register(
- "IsTabFillEnabled", typeof(bool), typeof(TabPanel), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsTabFillEnabled), typeof(bool), typeof(TabPanel), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否将标签填充
@@ -60,7 +60,7 @@ public class TabPanel : Panel
/// 标签宽度
///
public static readonly DependencyProperty TabItemWidthProperty = DependencyProperty.Register(
- "TabItemWidth", typeof(double), typeof(TabPanel), new PropertyMetadata(200.0));
+ nameof(TabItemWidth), typeof(double), typeof(TabPanel), new PropertyMetadata(200.0));
///
/// 标签宽度
@@ -75,7 +75,7 @@ public class TabPanel : Panel
/// 标签高度
///
public static readonly DependencyProperty TabItemHeightProperty = DependencyProperty.Register(
- "TabItemHeight", typeof(double), typeof(TabPanel), new PropertyMetadata(30.0));
+ nameof(TabItemHeight), typeof(double), typeof(TabPanel), new PropertyMetadata(30.0));
///
/// 标签高度
diff --git a/src/Shared/HandyControl_Shared/Controls/Tag/Tag.cs b/src/Shared/HandyControl_Shared/Controls/Tag/Tag.cs
index 4d6f31d1..3e3f713e 100644
--- a/src/Shared/HandyControl_Shared/Controls/Tag/Tag.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Tag/Tag.cs
@@ -23,7 +23,7 @@ public class Tag : ContentControl
}
public static readonly DependencyProperty ShowCloseButtonProperty = DependencyProperty.Register(
- "ShowCloseButton", typeof(bool), typeof(Tag), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowCloseButton), typeof(bool), typeof(Tag), new PropertyMetadata(ValueBoxes.TrueBox));
public bool ShowCloseButton
{
@@ -32,7 +32,7 @@ public class Tag : ContentControl
}
public static readonly DependencyProperty SelectableProperty = DependencyProperty.Register(
- "Selectable", typeof(bool), typeof(Tag), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(Selectable), typeof(bool), typeof(Tag), new PropertyMetadata(ValueBoxes.FalseBox));
public bool Selectable
{
@@ -41,7 +41,7 @@ public class Tag : ContentControl
}
public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(
- "IsSelected", typeof(bool), typeof(Tag), new PropertyMetadata(ValueBoxes.FalseBox, (o, args) =>
+ nameof(IsSelected), typeof(bool), typeof(Tag), new PropertyMetadata(ValueBoxes.FalseBox, (o, args) =>
{
var ctl = (Tag) o;
ctl.RaiseEvent(new RoutedEventArgs(SelectedEvent, ctl));
@@ -54,7 +54,7 @@ public class Tag : ContentControl
}
public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register(
- "Header", typeof(object), typeof(Tag), new PropertyMetadata(default, OnHeaderChanged));
+ nameof(Header), typeof(object), typeof(Tag), new PropertyMetadata(default, OnHeaderChanged));
private static void OnHeaderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -85,7 +85,7 @@ public class Tag : ContentControl
public bool HasHeader => (bool) GetValue(HasHeaderProperty);
public static readonly DependencyProperty HeaderStringFormatProperty = DependencyProperty.Register(
- "HeaderStringFormat", typeof(string), typeof(Tag), new PropertyMetadata(default(string)));
+ nameof(HeaderStringFormat), typeof(string), typeof(Tag), new PropertyMetadata(default(string)));
public string HeaderStringFormat
{
@@ -94,7 +94,7 @@ public class Tag : ContentControl
}
public static readonly DependencyProperty HeaderTemplateSelectorProperty = DependencyProperty.Register(
- "HeaderTemplateSelector", typeof(DataTemplateSelector), typeof(Tag), new PropertyMetadata(default(DataTemplateSelector)));
+ nameof(HeaderTemplateSelector), typeof(DataTemplateSelector), typeof(Tag), new PropertyMetadata(default(DataTemplateSelector)));
public DataTemplateSelector HeaderTemplateSelector
{
@@ -103,7 +103,7 @@ public class Tag : ContentControl
}
public static readonly DependencyProperty HeaderTemplateProperty = DependencyProperty.Register(
- "HeaderTemplate", typeof(DataTemplate), typeof(Tag), new PropertyMetadata(default(DataTemplate)));
+ nameof(HeaderTemplate), typeof(DataTemplate), typeof(Tag), new PropertyMetadata(default(DataTemplate)));
public DataTemplate HeaderTemplate
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Text/HighlightTextBlock.cs b/src/Shared/HandyControl_Shared/Controls/Text/HighlightTextBlock.cs
index 7537263c..f66a218e 100644
--- a/src/Shared/HandyControl_Shared/Controls/Text/HighlightTextBlock.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Text/HighlightTextBlock.cs
@@ -13,18 +13,18 @@ namespace HandyControl.Controls;
public class HighlightTextBlock : TextBlock
{
public static readonly DependencyProperty SourceTextProperty =
- DependencyProperty.Register("SourceText", typeof(string), typeof(HighlightTextBlock),
+ DependencyProperty.Register(nameof(SourceText), typeof(string), typeof(HighlightTextBlock),
new PropertyMetadata(null, OnSourceTextChanged));
public static readonly DependencyProperty QueriesTextProperty =
- DependencyProperty.Register("QueriesText", typeof(string), typeof(HighlightTextBlock),
+ DependencyProperty.Register(nameof(QueriesText), typeof(string), typeof(HighlightTextBlock),
new PropertyMetadata(null, OnQueriesTextChanged));
public static readonly DependencyProperty HighlightBrushProperty =
- DependencyProperty.Register("HighlightBrush", typeof(Brush), typeof(HighlightTextBlock));
+ DependencyProperty.Register(nameof(HighlightBrush), typeof(Brush), typeof(HighlightTextBlock));
public static readonly DependencyProperty HighlightTextBrushProperty =
- DependencyProperty.Register("HighlightTextBrush", typeof(Brush), typeof(HighlightTextBlock));
+ DependencyProperty.Register(nameof(HighlightTextBrush), typeof(Brush), typeof(HighlightTextBlock));
private static void OnSourceTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) =>
((HighlightTextBlock) d).RefreshInlines();
diff --git a/src/Shared/HandyControl_Shared/Controls/Text/OutlineText.cs b/src/Shared/HandyControl_Shared/Controls/Text/OutlineText.cs
index 8a51ad0f..1f6d5a20 100644
--- a/src/Shared/HandyControl_Shared/Controls/Text/OutlineText.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Text/OutlineText.cs
@@ -25,7 +25,7 @@ public class OutlineText : FrameworkElement
}
public static readonly DependencyProperty StrokePositionProperty = DependencyProperty.Register(
- "StrokePosition", typeof(StrokePosition), typeof(OutlineText), new PropertyMetadata(default(StrokePosition)));
+ nameof(StrokePosition), typeof(StrokePosition), typeof(OutlineText), new PropertyMetadata(default(StrokePosition)));
public StrokePosition StrokePosition
{
@@ -34,7 +34,7 @@ public class OutlineText : FrameworkElement
}
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
- "Text", typeof(string), typeof(OutlineText), new FrameworkPropertyMetadata(
+ nameof(Text), typeof(string), typeof(OutlineText), new FrameworkPropertyMetadata(
string.Empty,
FrameworkPropertyMetadataOptions.AffectsMeasure |
FrameworkPropertyMetadataOptions.AffectsRender, OnFormattedTextInvalidated));
@@ -46,7 +46,7 @@ public class OutlineText : FrameworkElement
}
public static readonly DependencyProperty TextAlignmentProperty = DependencyProperty.Register(
- "TextAlignment", typeof(TextAlignment), typeof(OutlineText),
+ nameof(TextAlignment), typeof(TextAlignment), typeof(OutlineText),
new PropertyMetadata(default(TextAlignment), OnFormattedTextUpdated));
public TextAlignment TextAlignment
@@ -56,7 +56,7 @@ public class OutlineText : FrameworkElement
}
public static readonly DependencyProperty TextTrimmingProperty = DependencyProperty.Register(
- "TextTrimming", typeof(TextTrimming), typeof(OutlineText),
+ nameof(TextTrimming), typeof(TextTrimming), typeof(OutlineText),
new PropertyMetadata(default(TextTrimming), OnFormattedTextInvalidated));
public TextTrimming TextTrimming
@@ -66,7 +66,7 @@ public class OutlineText : FrameworkElement
}
public static readonly DependencyProperty TextWrappingProperty = DependencyProperty.Register(
- "TextWrapping", typeof(TextWrapping), typeof(OutlineText),
+ nameof(TextWrapping), typeof(TextWrapping), typeof(OutlineText),
new PropertyMetadata(TextWrapping.NoWrap, OnFormattedTextInvalidated));
public TextWrapping TextWrapping
@@ -76,7 +76,7 @@ public class OutlineText : FrameworkElement
}
public static readonly DependencyProperty FillProperty = DependencyProperty.Register(
- "Fill", typeof(Brush), typeof(OutlineText), new PropertyMetadata(Brushes.Black, OnFormattedTextUpdated));
+ nameof(Fill), typeof(Brush), typeof(OutlineText), new PropertyMetadata(Brushes.Black, OnFormattedTextUpdated));
public Brush Fill
{
@@ -85,7 +85,7 @@ public class OutlineText : FrameworkElement
}
public static readonly DependencyProperty StrokeProperty = DependencyProperty.Register(
- "Stroke", typeof(Brush), typeof(OutlineText), new PropertyMetadata(Brushes.Black, OnFormattedTextUpdated));
+ nameof(Stroke), typeof(Brush), typeof(OutlineText), new PropertyMetadata(Brushes.Black, OnFormattedTextUpdated));
public Brush Stroke
{
@@ -94,7 +94,7 @@ public class OutlineText : FrameworkElement
}
public static readonly DependencyProperty StrokeThicknessProperty = DependencyProperty.Register(
- "StrokeThickness", typeof(double), typeof(OutlineText), new PropertyMetadata(ValueBoxes.Double0Box, OnFormattedTextUpdated));
+ nameof(StrokeThickness), typeof(double), typeof(OutlineText), new PropertyMetadata(ValueBoxes.Double0Box, OnFormattedTextUpdated));
public double StrokeThickness
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Text/SimpleText.cs b/src/Shared/HandyControl_Shared/Controls/Text/SimpleText.cs
index df94a03b..72be3da0 100644
--- a/src/Shared/HandyControl_Shared/Controls/Text/SimpleText.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Text/SimpleText.cs
@@ -19,7 +19,7 @@ public class SimpleText : FrameworkElement
}
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
- "Text", typeof(string), typeof(SimpleText), new FrameworkPropertyMetadata(
+ nameof(Text), typeof(string), typeof(SimpleText), new FrameworkPropertyMetadata(
string.Empty,
FrameworkPropertyMetadataOptions.AffectsMeasure |
FrameworkPropertyMetadataOptions.AffectsRender, OnFormattedTextInvalidated));
@@ -31,7 +31,7 @@ public class SimpleText : FrameworkElement
}
public static readonly DependencyProperty TextAlignmentProperty = DependencyProperty.Register(
- "TextAlignment", typeof(TextAlignment), typeof(SimpleText),
+ nameof(TextAlignment), typeof(TextAlignment), typeof(SimpleText),
new PropertyMetadata(default(TextAlignment), OnFormattedTextUpdated));
public TextAlignment TextAlignment
@@ -41,7 +41,7 @@ public class SimpleText : FrameworkElement
}
public static readonly DependencyProperty TextTrimmingProperty = DependencyProperty.Register(
- "TextTrimming", typeof(TextTrimming), typeof(SimpleText),
+ nameof(TextTrimming), typeof(TextTrimming), typeof(SimpleText),
new PropertyMetadata(default(TextTrimming), OnFormattedTextInvalidated));
public TextTrimming TextTrimming
@@ -51,7 +51,7 @@ public class SimpleText : FrameworkElement
}
public static readonly DependencyProperty TextWrappingProperty = DependencyProperty.Register(
- "TextWrapping", typeof(TextWrapping), typeof(SimpleText),
+ nameof(TextWrapping), typeof(TextWrapping), typeof(SimpleText),
new PropertyMetadata(TextWrapping.NoWrap, OnFormattedTextInvalidated));
public TextWrapping TextWrapping
@@ -61,7 +61,7 @@ public class SimpleText : FrameworkElement
}
public static readonly DependencyProperty ForegroundProperty = DependencyProperty.Register(
- "Foreground", typeof(Brush), typeof(SimpleText), new PropertyMetadata(Brushes.Black, OnFormattedTextUpdated));
+ nameof(Foreground), typeof(Brush), typeof(SimpleText), new PropertyMetadata(Brushes.Black, OnFormattedTextUpdated));
public Brush Foreground
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Time/CalendarWithClock.cs b/src/Shared/HandyControl_Shared/Controls/Time/CalendarWithClock.cs
index 98f54044..70e8d2a8 100644
--- a/src/Shared/HandyControl_Shared/Controls/Time/CalendarWithClock.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Time/CalendarWithClock.cs
@@ -73,7 +73,7 @@ public class CalendarWithClock : Control
#region Public Properties
public static readonly DependencyProperty DateTimeFormatProperty = DependencyProperty.Register(
- "DateTimeFormat", typeof(string), typeof(CalendarWithClock), new PropertyMetadata("yyyy-MM-dd HH:mm:ss"));
+ nameof(DateTimeFormat), typeof(string), typeof(CalendarWithClock), new PropertyMetadata("yyyy-MM-dd HH:mm:ss"));
public string DateTimeFormat
{
@@ -82,7 +82,7 @@ public class CalendarWithClock : Control
}
public static readonly DependencyProperty ShowConfirmButtonProperty = DependencyProperty.Register(
- "ShowConfirmButton", typeof(bool), typeof(CalendarWithClock), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowConfirmButton), typeof(bool), typeof(CalendarWithClock), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowConfirmButton
{
@@ -91,7 +91,7 @@ public class CalendarWithClock : Control
}
public static readonly DependencyProperty SelectedDateTimeProperty = DependencyProperty.Register(
- "SelectedDateTime", typeof(DateTime?), typeof(CalendarWithClock), new PropertyMetadata(default(DateTime?), OnSelectedDateTimeChanged));
+ nameof(SelectedDateTime), typeof(DateTime?), typeof(CalendarWithClock), new PropertyMetadata(default(DateTime?), OnSelectedDateTimeChanged));
private static void OnSelectedDateTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -110,7 +110,7 @@ public class CalendarWithClock : Control
}
public static readonly DependencyProperty DisplayDateTimeProperty = DependencyProperty.Register(
- "DisplayDateTime", typeof(DateTime), typeof(CalendarWithClock), new FrameworkPropertyMetadata(DateTime.MinValue, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnDisplayDateTimeChanged));
+ nameof(DisplayDateTime), typeof(DateTime), typeof(CalendarWithClock), new FrameworkPropertyMetadata(DateTime.MinValue, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnDisplayDateTimeChanged));
private static void OnDisplayDateTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Time/Clock/Clock.cs b/src/Shared/HandyControl_Shared/Controls/Time/Clock/Clock.cs
index 7b1c9919..fe36412f 100644
--- a/src/Shared/HandyControl_Shared/Controls/Time/Clock/Clock.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Time/Clock/Clock.cs
@@ -60,7 +60,7 @@ public class Clock : ClockBase
#region Public Properties
public static readonly DependencyProperty ClockRadioButtonStyleProperty = DependencyProperty.Register(
- "ClockRadioButtonStyle", typeof(Style), typeof(Clock), new PropertyMetadata(default(Style)));
+ nameof(ClockRadioButtonStyle), typeof(Style), typeof(Clock), new PropertyMetadata(default(Style)));
public Style ClockRadioButtonStyle
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Time/Clock/ClockBase.cs b/src/Shared/HandyControl_Shared/Controls/Time/Clock/ClockBase.cs
index 988f540c..43f16886 100644
--- a/src/Shared/HandyControl_Shared/Controls/Time/Clock/ClockBase.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Time/Clock/ClockBase.cs
@@ -29,7 +29,7 @@ public abstract class ClockBase : Control
}
public static readonly DependencyProperty TimeFormatProperty = DependencyProperty.Register(
- "TimeFormat", typeof(string), typeof(ClockBase), new PropertyMetadata("HH:mm:ss"));
+ nameof(TimeFormat), typeof(string), typeof(ClockBase), new PropertyMetadata("HH:mm:ss"));
public string TimeFormat
{
@@ -38,7 +38,7 @@ public abstract class ClockBase : Control
}
public static readonly DependencyProperty SelectedTimeProperty = DependencyProperty.Register(
- "SelectedTime", typeof(DateTime?), typeof(ClockBase), new PropertyMetadata(default(DateTime?), OnSelectedTimeChanged));
+ nameof(SelectedTime), typeof(DateTime?), typeof(ClockBase), new PropertyMetadata(default(DateTime?), OnSelectedTimeChanged));
private static void OnSelectedTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -58,7 +58,7 @@ public abstract class ClockBase : Control
}
public static readonly DependencyProperty DisplayTimeProperty = DependencyProperty.Register(
- "DisplayTime", typeof(DateTime), typeof(ClockBase),
+ nameof(DisplayTime), typeof(DateTime), typeof(ClockBase),
new FrameworkPropertyMetadata(DateTime.Now, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
OnDisplayTimeChanged));
@@ -77,7 +77,7 @@ public abstract class ClockBase : Control
}
internal static readonly DependencyProperty ShowConfirmButtonProperty = DependencyProperty.Register(
- "ShowConfirmButton", typeof(bool), typeof(ClockBase), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowConfirmButton), typeof(bool), typeof(ClockBase), new PropertyMetadata(ValueBoxes.FalseBox));
internal bool ShowConfirmButton
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Time/FlipClock/FlipClock.cs b/src/Shared/HandyControl_Shared/Controls/Time/FlipClock/FlipClock.cs
index cee951a2..8c13625a 100644
--- a/src/Shared/HandyControl_Shared/Controls/Time/FlipClock/FlipClock.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Time/FlipClock/FlipClock.cs
@@ -13,7 +13,7 @@ public class FlipClock : Control
private bool _isDisposed;
public static readonly DependencyProperty NumberListProperty = DependencyProperty.Register(
- "NumberList", typeof(List), typeof(FlipClock), new PropertyMetadata(new List { 0, 0, 0, 0, 0, 0 }));
+ nameof(NumberList), typeof(List), typeof(FlipClock), new PropertyMetadata(new List { 0, 0, 0, 0, 0, 0 }));
public List NumberList
{
@@ -22,7 +22,7 @@ public class FlipClock : Control
}
public static readonly DependencyProperty DisplayTimeProperty = DependencyProperty.Register(
- "DisplayTime", typeof(DateTime), typeof(FlipClock), new PropertyMetadata(default(DateTime), OnDisplayTimeChanged));
+ nameof(DisplayTime), typeof(DateTime), typeof(FlipClock), new PropertyMetadata(default(DateTime), OnDisplayTimeChanged));
private static void OnDisplayTimeChanged(DependencyObject s, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Time/FlipClock/FlipNumber.cs b/src/Shared/HandyControl_Shared/Controls/Time/FlipClock/FlipNumber.cs
index 2f7a1d96..bf54503a 100644
--- a/src/Shared/HandyControl_Shared/Controls/Time/FlipClock/FlipNumber.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Time/FlipClock/FlipNumber.cs
@@ -36,7 +36,7 @@ public class FlipNumber : Viewport3D
private bool _isAnimating;
public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register(
- "CornerRadius", typeof(CornerRadius), typeof(FlipNumber), new PropertyMetadata(new CornerRadius(4)));
+ nameof(CornerRadius), typeof(CornerRadius), typeof(FlipNumber), new PropertyMetadata(new CornerRadius(4)));
public CornerRadius CornerRadius
{
@@ -45,7 +45,7 @@ public class FlipNumber : Viewport3D
}
public static readonly DependencyProperty BackgroundProperty = DependencyProperty.Register(
- "Background", typeof(Brush), typeof(FlipNumber), new PropertyMetadata(default(Brush)));
+ nameof(Background), typeof(Brush), typeof(FlipNumber), new PropertyMetadata(default(Brush)));
public Brush Background
{
@@ -54,7 +54,7 @@ public class FlipNumber : Viewport3D
}
public static readonly DependencyProperty ForegroundProperty = DependencyProperty.Register(
- "Foreground", typeof(Brush), typeof(FlipNumber), new PropertyMetadata(default(Brush)));
+ nameof(Foreground), typeof(Brush), typeof(FlipNumber), new PropertyMetadata(default(Brush)));
public Brush Foreground
{
@@ -63,7 +63,7 @@ public class FlipNumber : Viewport3D
}
public static readonly DependencyProperty FontSizeProperty = DependencyProperty.Register(
- "FontSize", typeof(double), typeof(FlipNumber), new PropertyMetadata(70.0));
+ nameof(FontSize), typeof(double), typeof(FlipNumber), new PropertyMetadata(70.0));
[TypeConverter(typeof(FontSizeConverter))]
public double FontSize
@@ -73,7 +73,7 @@ public class FlipNumber : Viewport3D
}
public static readonly DependencyProperty NumberProperty = DependencyProperty.Register(
- "Number", typeof(int), typeof(FlipNumber), new PropertyMetadata(ValueBoxes.Int0Box, OnNumberChanged));
+ nameof(Number), typeof(int), typeof(FlipNumber), new PropertyMetadata(ValueBoxes.Int0Box, OnNumberChanged));
private static void OnNumberChanged(DependencyObject s, DependencyPropertyChangedEventArgs e) =>
((FlipNumber) s).OnNumberChanged();
diff --git a/src/Shared/HandyControl_Shared/Controls/Time/TimeBar/TimeBar.cs b/src/Shared/HandyControl_Shared/Controls/Time/TimeBar/TimeBar.cs
index 23a9d1f1..2a48fe4f 100644
--- a/src/Shared/HandyControl_Shared/Controls/Time/TimeBar/TimeBar.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Time/TimeBar/TimeBar.cs
@@ -59,7 +59,7 @@ public class TimeBar : Control
public Collection Hotspots { get; }
public static readonly DependencyProperty HotspotsBrushProperty = DependencyProperty.Register(
- "HotspotsBrush", typeof(Brush), typeof(TimeBar), new PropertyMetadata(default(Brush)));
+ nameof(HotspotsBrush), typeof(Brush), typeof(TimeBar), new PropertyMetadata(default(Brush)));
public Brush HotspotsBrush
{
@@ -71,7 +71,7 @@ public class TimeBar : Control
/// 是否显示刻度字符串
///
public static readonly DependencyProperty ShowSpeStrProperty = DependencyProperty.Register(
- "ShowSpeStr", typeof(bool), typeof(TimeBar), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowSpeStr), typeof(bool), typeof(TimeBar), new PropertyMetadata(ValueBoxes.FalseBox));
///
/// 是否显示刻度字符串
@@ -83,7 +83,7 @@ public class TimeBar : Control
}
public static readonly DependencyProperty TimeFormatProperty = DependencyProperty.Register(
- "TimeFormat", typeof(string), typeof(TimeBar), new PropertyMetadata("yyyy-MM-dd HH:mm:ss"));
+ nameof(TimeFormat), typeof(string), typeof(TimeBar), new PropertyMetadata("yyyy-MM-dd HH:mm:ss"));
public string TimeFormat
{
@@ -95,7 +95,7 @@ public class TimeBar : Control
/// 刻度字符串
///
internal static readonly DependencyProperty SpeStrProperty = DependencyProperty.Register(
- "SpeStr", typeof(string), typeof(TimeBar), new PropertyMetadata(Properties.Langs.Lang.Interval1h));
+ nameof(SpeStr), typeof(string), typeof(TimeBar), new PropertyMetadata(Properties.Langs.Lang.Interval1h));
///
/// 刻度字符串
@@ -110,7 +110,7 @@ public class TimeBar : Control
/// 选中时间
///
public static readonly DependencyProperty SelectedTimeProperty = DependencyProperty.Register(
- "SelectedTime", typeof(DateTime), typeof(TimeBar), new PropertyMetadata(default(DateTime), OnSelectedTimeChanged));
+ nameof(SelectedTime), typeof(DateTime), typeof(TimeBar), new PropertyMetadata(default(DateTime), OnSelectedTimeChanged));
private static void OnSelectedTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Transfer/TransferItem.cs b/src/Shared/HandyControl_Shared/Controls/Transfer/TransferItem.cs
index d76ac608..8d30d7c8 100644
--- a/src/Shared/HandyControl_Shared/Controls/Transfer/TransferItem.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Transfer/TransferItem.cs
@@ -6,7 +6,7 @@ namespace HandyControl.Controls;
public class TransferItem : SelectableItem
{
public static readonly DependencyProperty IsTransferredProperty = DependencyProperty.Register(
- "IsTransferred", typeof(bool), typeof(TransferItem), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsTransferred), typeof(bool), typeof(TransferItem), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsTransferred
{
@@ -15,7 +15,7 @@ public class TransferItem : SelectableItem
}
public static readonly DependencyProperty IsOriginProperty = DependencyProperty.Register(
- "IsOrigin", typeof(bool), typeof(TransferItem), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(IsOrigin), typeof(bool), typeof(TransferItem), new PropertyMetadata(ValueBoxes.TrueBox));
public bool IsOrigin
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Window/GlowWindow.cs b/src/Shared/HandyControl_Shared/Controls/Window/GlowWindow.cs
index 72eefe15..b0cdbeeb 100644
--- a/src/Shared/HandyControl_Shared/Controls/Window/GlowWindow.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Window/GlowWindow.cs
@@ -31,7 +31,7 @@ public class GlowWindow : Window
private Rect _logicalSizeForRestore = Rect.Empty;
public static readonly DependencyProperty ActiveGlowColorProperty = DependencyProperty.Register(
- "ActiveGlowColor", typeof(Color), typeof(GlowWindow), new PropertyMetadata(default(Color), OnGlowColorChanged));
+ nameof(ActiveGlowColor), typeof(Color), typeof(GlowWindow), new PropertyMetadata(default(Color), OnGlowColorChanged));
public Color ActiveGlowColor
{
@@ -40,7 +40,7 @@ public class GlowWindow : Window
}
public static readonly DependencyProperty InactiveGlowColorProperty = DependencyProperty.Register(
- "InactiveGlowColor", typeof(Color), typeof(GlowWindow), new PropertyMetadata(default(Color), OnGlowColorChanged));
+ nameof(InactiveGlowColor), typeof(Color), typeof(GlowWindow), new PropertyMetadata(default(Color), OnGlowColorChanged));
public Color InactiveGlowColor
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Window/MessageBox.cs b/src/Shared/HandyControl_Shared/Controls/Window/MessageBox.cs
index 8586d12d..c1e3f91d 100644
--- a/src/Shared/HandyControl_Shared/Controls/Window/MessageBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Window/MessageBox.cs
@@ -53,7 +53,7 @@ public sealed class MessageBox : Window
private IntPtr _lastActiveWindowIntPtr;
public static readonly DependencyProperty MessageProperty = DependencyProperty.Register(
- "Message", typeof(string), typeof(MessageBox), new PropertyMetadata(default(string)));
+ nameof(Message), typeof(string), typeof(MessageBox), new PropertyMetadata(default(string)));
public string Message
{
@@ -62,7 +62,7 @@ public sealed class MessageBox : Window
}
public static readonly DependencyProperty ImageProperty = DependencyProperty.Register(
- "Image", typeof(Geometry), typeof(MessageBox), new PropertyMetadata(default(Geometry)));
+ nameof(Image), typeof(Geometry), typeof(MessageBox), new PropertyMetadata(default(Geometry)));
public Geometry Image
{
@@ -71,7 +71,7 @@ public sealed class MessageBox : Window
}
public static readonly DependencyProperty ImageBrushProperty = DependencyProperty.Register(
- "ImageBrush", typeof(Brush), typeof(MessageBox), new PropertyMetadata(default(Brush)));
+ nameof(ImageBrush), typeof(Brush), typeof(MessageBox), new PropertyMetadata(default(Brush)));
public Brush ImageBrush
{
@@ -80,7 +80,7 @@ public sealed class MessageBox : Window
}
public static readonly DependencyProperty ShowImageProperty = DependencyProperty.Register(
- "ShowImage", typeof(bool), typeof(MessageBox), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowImage), typeof(bool), typeof(MessageBox), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowImage
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Window/PopupWindow.cs b/src/Shared/HandyControl_Shared/Controls/Window/PopupWindow.cs
index 3416d7b0..ee28e704 100644
--- a/src/Shared/HandyControl_Shared/Controls/Window/PopupWindow.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Window/PopupWindow.cs
@@ -56,7 +56,7 @@ public class PopupWindow : System.Windows.Window
}
internal static readonly DependencyProperty ContentStrProperty = DependencyProperty.Register(
- "ContentStr", typeof(string), typeof(PopupWindow), new PropertyMetadata(default(string)));
+ nameof(ContentStr), typeof(string), typeof(PopupWindow), new PropertyMetadata(default(string)));
internal string ContentStr
{
@@ -104,7 +104,7 @@ public class PopupWindow : System.Windows.Window
public FrameworkElement PopupElement { get; set; }
public static readonly DependencyProperty ShowTitleProperty = DependencyProperty.Register(
- "ShowTitle", typeof(bool), typeof(PopupWindow), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowTitle), typeof(bool), typeof(PopupWindow), new PropertyMetadata(ValueBoxes.TrueBox));
public bool ShowTitle
{
@@ -113,7 +113,7 @@ public class PopupWindow : System.Windows.Window
}
public static readonly DependencyProperty ShowCancelProperty = DependencyProperty.Register(
- "ShowCancel", typeof(bool), typeof(PopupWindow), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowCancel), typeof(bool), typeof(PopupWindow), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowCancel
{
@@ -122,7 +122,7 @@ public class PopupWindow : System.Windows.Window
}
public static readonly DependencyProperty ShowBorderProperty = DependencyProperty.Register(
- "ShowBorder", typeof(bool), typeof(PopupWindow), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(ShowBorder), typeof(bool), typeof(PopupWindow), new PropertyMetadata(ValueBoxes.FalseBox));
public bool ShowBorder
{
diff --git a/src/Shared/HandyControl_Shared/Controls/Window/Window.cs b/src/Shared/HandyControl_Shared/Controls/Window/Window.cs
index 0b961b18..736cf629 100644
--- a/src/Shared/HandyControl_Shared/Controls/Window/Window.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Window/Window.cs
@@ -79,7 +79,7 @@ namespace HandyControl.Controls
#region prop
public static readonly DependencyProperty NonClientAreaContentProperty = DependencyProperty.Register(
- "NonClientAreaContent", typeof(object), typeof(Window), new PropertyMetadata(default(object)));
+ nameof(NonClientAreaContent), typeof(object), typeof(Window), new PropertyMetadata(default(object)));
public object NonClientAreaContent
{
@@ -88,7 +88,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty CloseButtonHoverBackgroundProperty = DependencyProperty.Register(
- "CloseButtonHoverBackground", typeof(Brush), typeof(Window),
+ nameof(CloseButtonHoverBackground), typeof(Brush), typeof(Window),
new PropertyMetadata(default(Brush)));
public Brush CloseButtonHoverBackground
@@ -99,7 +99,7 @@ namespace HandyControl.Controls
public static readonly DependencyProperty CloseButtonHoverForegroundProperty =
DependencyProperty.Register(
- "CloseButtonHoverForeground", typeof(Brush), typeof(Window),
+ nameof(CloseButtonHoverForeground), typeof(Brush), typeof(Window),
new PropertyMetadata(default(Brush)));
public Brush CloseButtonHoverForeground
@@ -109,7 +109,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty CloseButtonBackgroundProperty = DependencyProperty.Register(
- "CloseButtonBackground", typeof(Brush), typeof(Window), new PropertyMetadata(Brushes.Transparent));
+ nameof(CloseButtonBackground), typeof(Brush), typeof(Window), new PropertyMetadata(Brushes.Transparent));
public Brush CloseButtonBackground
{
@@ -118,7 +118,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty CloseButtonForegroundProperty = DependencyProperty.Register(
- "CloseButtonForeground", typeof(Brush), typeof(Window),
+ nameof(CloseButtonForeground), typeof(Brush), typeof(Window),
new PropertyMetadata(Brushes.White));
public Brush CloseButtonForeground
@@ -128,7 +128,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty OtherButtonBackgroundProperty = DependencyProperty.Register(
- "OtherButtonBackground", typeof(Brush), typeof(Window), new PropertyMetadata(Brushes.Transparent));
+ nameof(OtherButtonBackground), typeof(Brush), typeof(Window), new PropertyMetadata(Brushes.Transparent));
public Brush OtherButtonBackground
{
@@ -137,7 +137,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty OtherButtonForegroundProperty = DependencyProperty.Register(
- "OtherButtonForeground", typeof(Brush), typeof(Window),
+ nameof(OtherButtonForeground), typeof(Brush), typeof(Window),
new PropertyMetadata(Brushes.White));
public Brush OtherButtonForeground
@@ -147,7 +147,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty OtherButtonHoverBackgroundProperty = DependencyProperty.Register(
- "OtherButtonHoverBackground", typeof(Brush), typeof(Window),
+ nameof(OtherButtonHoverBackground), typeof(Brush), typeof(Window),
new PropertyMetadata(default(Brush)));
public Brush OtherButtonHoverBackground
@@ -158,7 +158,7 @@ namespace HandyControl.Controls
public static readonly DependencyProperty OtherButtonHoverForegroundProperty =
DependencyProperty.Register(
- "OtherButtonHoverForeground", typeof(Brush), typeof(Window),
+ nameof(OtherButtonHoverForeground), typeof(Brush), typeof(Window),
new PropertyMetadata(default(Brush)));
public Brush OtherButtonHoverForeground
@@ -168,7 +168,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty NonClientAreaBackgroundProperty = DependencyProperty.Register(
- "NonClientAreaBackground", typeof(Brush), typeof(Window),
+ nameof(NonClientAreaBackground), typeof(Brush), typeof(Window),
new PropertyMetadata(default(Brush)));
public Brush NonClientAreaBackground
@@ -178,7 +178,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty NonClientAreaForegroundProperty = DependencyProperty.Register(
- "NonClientAreaForeground", typeof(Brush), typeof(Window),
+ nameof(NonClientAreaForeground), typeof(Brush), typeof(Window),
new PropertyMetadata(default(Brush)));
public Brush NonClientAreaForeground
@@ -188,7 +188,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty NonClientAreaHeightProperty = DependencyProperty.Register(
- "NonClientAreaHeight", typeof(double), typeof(Window),
+ nameof(NonClientAreaHeight), typeof(double), typeof(Window),
new PropertyMetadata(22.0));
public double NonClientAreaHeight
@@ -198,7 +198,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty ShowNonClientAreaProperty = DependencyProperty.Register(
- "ShowNonClientArea", typeof(bool), typeof(Window),
+ nameof(ShowNonClientArea), typeof(bool), typeof(Window),
new PropertyMetadata(ValueBoxes.TrueBox, OnShowNonClientAreaChanged));
public bool ShowNonClientArea
@@ -208,7 +208,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty ShowTitleProperty = DependencyProperty.Register(
- "ShowTitle", typeof(bool), typeof(Window), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowTitle), typeof(bool), typeof(Window), new PropertyMetadata(ValueBoxes.TrueBox));
public bool ShowTitle
{
@@ -217,7 +217,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty IsFullScreenProperty = DependencyProperty.Register(
- "IsFullScreen", typeof(bool), typeof(Window),
+ nameof(IsFullScreen), typeof(bool), typeof(Window),
new PropertyMetadata(ValueBoxes.FalseBox, OnIsFullScreenChanged));
public bool IsFullScreen
@@ -227,7 +227,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty ShowIconProperty = DependencyProperty.Register(
- "ShowIcon", typeof(bool), typeof(Window), new PropertyMetadata(ValueBoxes.TrueBox));
+ nameof(ShowIcon), typeof(bool), typeof(Window), new PropertyMetadata(ValueBoxes.TrueBox));
public bool ShowIcon
{
diff --git a/src/Shared/HandyControl_Shared/Media/Animation/EasingGeometryKeyFrame.cs b/src/Shared/HandyControl_Shared/Media/Animation/EasingGeometryKeyFrame.cs
index 81f41ab4..8280136c 100644
--- a/src/Shared/HandyControl_Shared/Media/Animation/EasingGeometryKeyFrame.cs
+++ b/src/Shared/HandyControl_Shared/Media/Animation/EasingGeometryKeyFrame.cs
@@ -52,7 +52,7 @@ public class EasingGeometryKeyFrame : GeometryKeyFrame
}
public static readonly DependencyProperty EasingFunctionProperty = DependencyProperty.Register(
- "EasingFunction", typeof(IEasingFunction), typeof(EasingGeometryKeyFrame), new PropertyMetadata(default(IEasingFunction)));
+ nameof(EasingFunction), typeof(IEasingFunction), typeof(EasingGeometryKeyFrame), new PropertyMetadata(default(IEasingFunction)));
public IEasingFunction EasingFunction
{
diff --git a/src/Shared/HandyControl_Shared/Media/Animation/GeometryAnimation.cs b/src/Shared/HandyControl_Shared/Media/Animation/GeometryAnimation.cs
index 572602ee..107a49fc 100644
--- a/src/Shared/HandyControl_Shared/Media/Animation/GeometryAnimation.cs
+++ b/src/Shared/HandyControl_Shared/Media/Animation/GeometryAnimation.cs
@@ -123,7 +123,7 @@ public class GeometryAnimation : GeometryAnimationBase
}
public static readonly DependencyProperty FromProperty = DependencyProperty.Register(
- "From", typeof(Geometry), typeof(GeometryAnimation), new PropertyMetadata(default(Geometry), OnFromChanged));
+ nameof(From), typeof(Geometry), typeof(GeometryAnimation), new PropertyMetadata(default(Geometry), OnFromChanged));
private static void OnFromChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -142,7 +142,7 @@ public class GeometryAnimation : GeometryAnimationBase
}
public static readonly DependencyProperty ToProperty = DependencyProperty.Register(
- "To", typeof(Geometry), typeof(GeometryAnimation), new PropertyMetadata(default(Geometry), OnToChanged));
+ nameof(To), typeof(Geometry), typeof(GeometryAnimation), new PropertyMetadata(default(Geometry), OnToChanged));
private static void OnToChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -163,7 +163,7 @@ public class GeometryAnimation : GeometryAnimationBase
}
public static readonly DependencyProperty EasingFunctionProperty = DependencyProperty.Register(
- "EasingFunction", typeof(IEasingFunction), typeof(GeometryAnimation), new PropertyMetadata(default(IEasingFunction)));
+ nameof(EasingFunction), typeof(IEasingFunction), typeof(GeometryAnimation), new PropertyMetadata(default(IEasingFunction)));
public IEasingFunction EasingFunction
{
diff --git a/src/Shared/HandyControl_Shared/Media/Animation/GeometryKeyFrame.cs b/src/Shared/HandyControl_Shared/Media/Animation/GeometryKeyFrame.cs
index f91698a6..3b72031e 100644
--- a/src/Shared/HandyControl_Shared/Media/Animation/GeometryKeyFrame.cs
+++ b/src/Shared/HandyControl_Shared/Media/Animation/GeometryKeyFrame.cs
@@ -24,7 +24,7 @@ public abstract class GeometryKeyFrame : Freezable, IKeyFrame
protected GeometryKeyFrame(Geometry value, KeyTime keyTime) : this(value) => KeyTime = keyTime;
public static readonly DependencyProperty KeyTimeProperty = DependencyProperty.Register(
- "KeyTime", typeof(KeyTime), typeof(GeometryKeyFrame), new PropertyMetadata(KeyTime.Uniform));
+ nameof(KeyTime), typeof(KeyTime), typeof(GeometryKeyFrame), new PropertyMetadata(KeyTime.Uniform));
public KeyTime KeyTime
{
@@ -39,7 +39,7 @@ public abstract class GeometryKeyFrame : Freezable, IKeyFrame
}
public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
- "Value", typeof(Geometry), typeof(GeometryKeyFrame), new PropertyMetadata(default(Geometry), OnValueChanged));
+ nameof(Value), typeof(Geometry), typeof(GeometryKeyFrame), new PropertyMetadata(default(Geometry), OnValueChanged));
private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
diff --git a/src/Shared/HandyControl_Shared/Media/Animation/SplineGeometryKeyFrame.cs b/src/Shared/HandyControl_Shared/Media/Animation/SplineGeometryKeyFrame.cs
index 5884af9b..86f98739 100644
--- a/src/Shared/HandyControl_Shared/Media/Animation/SplineGeometryKeyFrame.cs
+++ b/src/Shared/HandyControl_Shared/Media/Animation/SplineGeometryKeyFrame.cs
@@ -48,7 +48,7 @@ public class SplineGeometryKeyFrame : GeometryKeyFrame
}
public static readonly DependencyProperty KeySplineProperty = DependencyProperty.Register(
- "KeySpline", typeof(KeySpline), typeof(SplineGeometryKeyFrame), new PropertyMetadata(new KeySpline()));
+ nameof(KeySpline), typeof(KeySpline), typeof(SplineGeometryKeyFrame), new PropertyMetadata(new KeySpline()));
public KeySpline KeySpline
{
diff --git a/src/Shared/HandyControl_Shared/Media/Effects/BrightnessEffect.cs b/src/Shared/HandyControl_Shared/Media/Effects/BrightnessEffect.cs
index 531bb4a8..c5dec357 100644
--- a/src/Shared/HandyControl_Shared/Media/Effects/BrightnessEffect.cs
+++ b/src/Shared/HandyControl_Shared/Media/Effects/BrightnessEffect.cs
@@ -26,7 +26,7 @@ public class BrightnessEffect : EffectBase
}
public static readonly DependencyProperty BrightnessProperty = DependencyProperty.Register(
- "Brightness", typeof(double), typeof(BrightnessEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(0)));
+ nameof(Brightness), typeof(double), typeof(BrightnessEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(0)));
public double Brightness
{
diff --git a/src/Shared/HandyControl_Shared/Media/Effects/ColorMatrixEffect.cs b/src/Shared/HandyControl_Shared/Media/Effects/ColorMatrixEffect.cs
index b97684fd..15c96b5e 100644
--- a/src/Shared/HandyControl_Shared/Media/Effects/ColorMatrixEffect.cs
+++ b/src/Shared/HandyControl_Shared/Media/Effects/ColorMatrixEffect.cs
@@ -51,7 +51,7 @@ public class ColorMatrixEffect : EffectBase
#region Line1
public static readonly DependencyProperty M11Property = DependencyProperty.Register(
- "M11", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(0)));
+ nameof(M11), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(0)));
public double M11
{
@@ -60,7 +60,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M21Property = DependencyProperty.Register(
- "M21", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(1)));
+ nameof(M21), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(1)));
public double M21
{
@@ -69,7 +69,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M31Property = DependencyProperty.Register(
- "M31", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(2)));
+ nameof(M31), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(2)));
public double M31
{
@@ -78,7 +78,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M41Property = DependencyProperty.Register(
- "M41", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(3)));
+ nameof(M41), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(3)));
public double M41
{
@@ -87,7 +87,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M51Property = DependencyProperty.Register(
- "M51", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(4)));
+ nameof(M51), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(4)));
public double M51
{
@@ -100,7 +100,7 @@ public class ColorMatrixEffect : EffectBase
#region Line2
public static readonly DependencyProperty M12Property = DependencyProperty.Register(
- "M12", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(5)));
+ nameof(M12), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(5)));
public double M12
{
@@ -109,7 +109,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M22Property = DependencyProperty.Register(
- "M22", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(6)));
+ nameof(M22), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(6)));
public double M22
{
@@ -118,7 +118,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M32Property = DependencyProperty.Register(
- "M32", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(7)));
+ nameof(M32), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(7)));
public double M32
{
@@ -127,7 +127,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M42Property = DependencyProperty.Register(
- "M42", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(8)));
+ nameof(M42), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(8)));
public double M42
{
@@ -136,7 +136,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M52Property = DependencyProperty.Register(
- "M52", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(9)));
+ nameof(M52), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(9)));
public double M52
{
@@ -149,7 +149,7 @@ public class ColorMatrixEffect : EffectBase
#region Line3
public static readonly DependencyProperty M13Property = DependencyProperty.Register(
- "M13", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(10)));
+ nameof(M13), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(10)));
public double M13
{
@@ -158,7 +158,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M23Property = DependencyProperty.Register(
- "M23", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(11)));
+ nameof(M23), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(11)));
public double M23
{
@@ -167,7 +167,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M33Property = DependencyProperty.Register(
- "M33", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(12)));
+ nameof(M33), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(12)));
public double M33
{
@@ -176,7 +176,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M43Property = DependencyProperty.Register(
- "M43", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(13)));
+ nameof(M43), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(13)));
public double M43
{
@@ -185,7 +185,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M53Property = DependencyProperty.Register(
- "M53", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(14)));
+ nameof(M53), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(14)));
public double M53
{
@@ -198,7 +198,7 @@ public class ColorMatrixEffect : EffectBase
#region Line4
public static readonly DependencyProperty M14Property = DependencyProperty.Register(
- "M14", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(15)));
+ nameof(M14), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(15)));
public double M14
{
@@ -207,7 +207,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M24Property = DependencyProperty.Register(
- "M24", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(16)));
+ nameof(M24), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(16)));
public double M24
{
@@ -216,7 +216,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M34Property = DependencyProperty.Register(
- "M34", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(17)));
+ nameof(M34), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(17)));
public double M34
{
@@ -225,7 +225,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M44Property = DependencyProperty.Register(
- "M44", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(18)));
+ nameof(M44), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(18)));
public double M44
{
@@ -234,7 +234,7 @@ public class ColorMatrixEffect : EffectBase
}
public static readonly DependencyProperty M54Property = DependencyProperty.Register(
- "M54", typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(19)));
+ nameof(M54), typeof(double), typeof(ColorMatrixEffect), new PropertyMetadata(ValueBoxes.Double0Box, PixelShaderConstantCallback(19)));
public double M54
{
diff --git a/src/Shared/HandyControl_Shared/Media/Effects/ContrastEffect.cs b/src/Shared/HandyControl_Shared/Media/Effects/ContrastEffect.cs
index b17b802d..70cee37c 100644
--- a/src/Shared/HandyControl_Shared/Media/Effects/ContrastEffect.cs
+++ b/src/Shared/HandyControl_Shared/Media/Effects/ContrastEffect.cs
@@ -26,7 +26,7 @@ public class ContrastEffect : EffectBase
}
public static readonly DependencyProperty ContrastProperty = DependencyProperty.Register(
- "Contrast", typeof(double), typeof(ContrastEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(0)));
+ nameof(Contrast), typeof(double), typeof(ContrastEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(0)));
public double Contrast
{
diff --git a/src/Shared/HandyControl_Shared/Media/Effects/GrayScaleEffect.cs b/src/Shared/HandyControl_Shared/Media/Effects/GrayScaleEffect.cs
index 671a20e6..16ddcf57 100644
--- a/src/Shared/HandyControl_Shared/Media/Effects/GrayScaleEffect.cs
+++ b/src/Shared/HandyControl_Shared/Media/Effects/GrayScaleEffect.cs
@@ -26,7 +26,7 @@ public class GrayScaleEffect : EffectBase
}
public static readonly DependencyProperty ScaleProperty = DependencyProperty.Register(
- "Scale", typeof(double), typeof(GrayScaleEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(0)));
+ nameof(Scale), typeof(double), typeof(GrayScaleEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(0)));
public double Scale
{