chore: use nameof expression.
This commit is contained in:
1 parent
3876444176
commit
c513f5c6f5
116 files changed
+507
-507
No files matched your search
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user