Skip to content

Commit 4e89ea5

Browse files
committed
Code style
1 parent 9adb7a5 commit 4e89ea5

File tree

7 files changed

+89
-30
lines changed

7 files changed

+89
-30
lines changed

IPConfig/Behaviors/ContextMenuLeftClickBehavior.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ namespace IPConfig.Behaviors;
1010
/// </summary>
1111
public static class ContextMenuLeftClickBehavior
1212
{
13-
public static readonly DependencyProperty IsLeftClickEnabledProperty = DependencyProperty.RegisterAttached(
14-
"IsLeftClickEnabled", typeof(bool), typeof(ContextMenuLeftClickBehavior),
15-
new UIPropertyMetadata(false, OnIsLeftClickEnabledChanged));
13+
public static readonly DependencyProperty IsLeftClickEnabledProperty =
14+
DependencyProperty.RegisterAttached(
15+
"IsLeftClickEnabled",
16+
typeof(bool),
17+
typeof(ContextMenuLeftClickBehavior),
18+
new UIPropertyMetadata(false, OnIsLeftClickEnabledChanged));
1619

1720
public static bool GetIsLeftClickEnabled(DependencyObject obj)
1821
{

IPConfig/Behaviors/IgnoreMouseWheelBehavior.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ public sealed class IgnoreMouseWheelBehavior : Behavior<UIElement>
1515
{
1616
// Using a DependencyProperty as the backing store for Enabled. This enables animation, styling, binding, etc...
1717
public static readonly DependencyProperty EnabledProperty =
18-
DependencyProperty.RegisterAttached("Enabled", typeof(bool), typeof(IgnoreMouseWheelBehavior), new PropertyMetadata(false, OnEnabledChanged));
18+
DependencyProperty.RegisterAttached(
19+
"Enabled",
20+
typeof(bool),
21+
typeof(IgnoreMouseWheelBehavior),
22+
new PropertyMetadata(false, OnEnabledChanged));
1923

2024
public static bool GetEnabled(DependencyObject obj)
2125
{

IPConfig/Behaviors/InputBindingBehavior.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ namespace IPConfig.Behaviors;
1717
public class InputBindingBehavior
1818
{
1919
public static readonly DependencyProperty PropagateInputBindingsToWindowProperty =
20-
DependencyProperty.RegisterAttached("PropagateInputBindingsToWindow", typeof(bool), typeof(InputBindingBehavior),
20+
DependencyProperty.RegisterAttached(
21+
"PropagateInputBindingsToWindow",
22+
typeof(bool),
23+
typeof(InputBindingBehavior),
2124
new PropertyMetadata(false, OnPropagateInputBindingsToWindowChanged));
2225

2326
private static readonly Dictionary<int, Tuple<WeakReference<FrameworkElement>, List<InputBinding>>> _trackedFrameWorkElementsToBindings = [];

IPConfig/Behaviors/SelectedItemsBehavior.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ namespace IPConfig.Behaviors;
1515
public sealed class SelectedItemsBehavior
1616
{
1717
public static readonly DependencyProperty SelectedItemsProperty =
18-
DependencyProperty.RegisterAttached("SelectedItems",
18+
DependencyProperty.RegisterAttached(
19+
"SelectedItems",
1920
typeof(INotifyCollectionChanged),
2021
typeof(SelectedItemsBehavior),
2122
new PropertyMetadata(default(IList), OnSelectedItemsChanged));
2223

2324
private static readonly DependencyProperty _isBusyProperty =
24-
DependencyProperty.RegisterAttached("IsBusy",
25+
DependencyProperty.RegisterAttached(
26+
"IsBusy",
2527
typeof(bool),
2628
typeof(SelectedItemsBehavior),
2729
new PropertyMetadata(default(bool)));

IPConfig/Behaviors/TripleClickToSelectAllBehavior.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ namespace IPConfig.Behaviors;
99
/// </summary>
1010
public class TripleClickToSelectAllBehavior
1111
{
12-
public static readonly DependencyProperty EnabledProperty = DependencyProperty.RegisterAttached(
13-
"Enabled", typeof(bool), typeof(TripleClickToSelectAllBehavior), new PropertyMetadata(false, OnPropertyChanged));
12+
public static readonly DependencyProperty EnabledProperty =
13+
DependencyProperty.RegisterAttached(
14+
"Enabled",
15+
typeof(bool),
16+
typeof(TripleClickToSelectAllBehavior),
17+
new PropertyMetadata(false, OnPropertyChanged));
1418

1519
public static bool GetEnabled(DependencyObject element)
1620
{

IPConfig/Controls/AlignDashCornerRect.cs

Lines changed: 59 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,75 @@ namespace IPConfig.Controls;
1010
/// </summary>
1111
public class AlignDashCornerRect : FrameworkElement
1212
{
13-
public static readonly DependencyProperty FillProperty = DependencyProperty.Register(
14-
"Fill", typeof(Brush), typeof(AlignDashCornerRect), new PropertyMetadata(default(Brush), OnVisualPropertyChanged));
13+
public static readonly DependencyProperty FillProperty =
14+
DependencyProperty.Register(
15+
"Fill",
16+
typeof(Brush),
17+
typeof(AlignDashCornerRect),
18+
new PropertyMetadata(default(Brush), OnVisualPropertyChanged));
1519

1620
public static readonly DependencyProperty StrokeDashCapProperty =
17-
DependencyProperty.Register("StrokeDashCap", typeof(PenLineCap), typeof(AlignDashCornerRect), new PropertyMetadata(PenLineCap.Flat, OnVisualPropertyChanged));
18-
19-
public static readonly DependencyProperty StrokeDashLineProperty = DependencyProperty.Register(
20-
"StrokeDashLine", typeof(double), typeof(AlignDashCornerRect), new PropertyMetadata(default(double), OnVisualPropertyChanged));
21-
22-
public static readonly DependencyProperty StrokeDashSpaceProperty = DependencyProperty.Register(
23-
"StrokeDashSpace", typeof(double), typeof(AlignDashCornerRect), new PropertyMetadata(default(double), OnVisualPropertyChanged));
21+
DependencyProperty.Register(
22+
"StrokeDashCap",
23+
typeof(PenLineCap),
24+
typeof(AlignDashCornerRect),
25+
new PropertyMetadata(PenLineCap.Flat, OnVisualPropertyChanged));
26+
27+
public static readonly DependencyProperty StrokeDashLineProperty =
28+
DependencyProperty.Register(
29+
"StrokeDashLine",
30+
typeof(double),
31+
typeof(AlignDashCornerRect),
32+
new PropertyMetadata(default(double), OnVisualPropertyChanged));
33+
34+
public static readonly DependencyProperty StrokeDashSpaceProperty =
35+
DependencyProperty.Register(
36+
"StrokeDashSpace",
37+
typeof(double),
38+
typeof(AlignDashCornerRect),
39+
new PropertyMetadata(default(double), OnVisualPropertyChanged));
2440

2541
public static readonly DependencyProperty StrokeEndLineCapProperty =
26-
DependencyProperty.Register("StrokeEndLineCap", typeof(PenLineCap), typeof(AlignDashCornerRect), new PropertyMetadata(PenLineCap.Flat, OnVisualPropertyChanged));
42+
DependencyProperty.Register(
43+
"StrokeEndLineCap",
44+
typeof(PenLineCap),
45+
typeof(AlignDashCornerRect),
46+
new PropertyMetadata(PenLineCap.Flat, OnVisualPropertyChanged));
2747

2848
public static readonly DependencyProperty StrokeLineJoinProperty =
29-
DependencyProperty.Register("StrokeLineJoin", typeof(PenLineJoin), typeof(AlignDashCornerRect), new PropertyMetadata(PenLineJoin.Miter, OnVisualPropertyChanged));
49+
DependencyProperty.Register(
50+
"StrokeLineJoin",
51+
typeof(PenLineJoin),
52+
typeof(AlignDashCornerRect),
53+
new PropertyMetadata(PenLineJoin.Miter, OnVisualPropertyChanged));
3054

3155
public static readonly DependencyProperty StrokeMiterLimitProperty =
32-
DependencyProperty.Register("StrokeMiterLimit", typeof(double), typeof(AlignDashCornerRect), new PropertyMetadata(10.0d, OnVisualPropertyChanged));
33-
34-
public static readonly DependencyProperty StrokeProperty = DependencyProperty.Register(
35-
"Stroke", typeof(Brush), typeof(AlignDashCornerRect), new PropertyMetadata(default(Brush), OnVisualPropertyChanged));
56+
DependencyProperty.Register(
57+
"StrokeMiterLimit",
58+
typeof(double),
59+
typeof(AlignDashCornerRect),
60+
new PropertyMetadata(10.0d, OnVisualPropertyChanged));
61+
62+
public static readonly DependencyProperty StrokeProperty =
63+
DependencyProperty.Register(
64+
"Stroke",
65+
typeof(Brush),
66+
typeof(AlignDashCornerRect),
67+
new PropertyMetadata(default(Brush), OnVisualPropertyChanged));
3668

3769
public static readonly DependencyProperty StrokeStartLineCapProperty =
38-
DependencyProperty.Register("StrokeStartLineCap", typeof(PenLineCap), typeof(AlignDashCornerRect), new PropertyMetadata(PenLineCap.Flat, OnVisualPropertyChanged));
39-
40-
public static readonly DependencyProperty StrokeThicknessProperty = DependencyProperty.Register(
41-
"StrokeThickness", typeof(double), typeof(AlignDashCornerRect), new PropertyMetadata(default(double), OnVisualPropertyChanged));
70+
DependencyProperty.Register(
71+
"StrokeStartLineCap",
72+
typeof(PenLineCap),
73+
typeof(AlignDashCornerRect),
74+
new PropertyMetadata(PenLineCap.Flat, OnVisualPropertyChanged));
75+
76+
public static readonly DependencyProperty StrokeThicknessProperty =
77+
DependencyProperty.Register(
78+
"StrokeThickness",
79+
typeof(double),
80+
typeof(AlignDashCornerRect),
81+
new PropertyMetadata(default(double), OnVisualPropertyChanged));
4282

4383
public Brush Fill
4484
{

IPConfig/Controls/DeferredContent.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ namespace IPConfig.Controls;
1010
public class DeferredContent : ContentPresenter
1111
{
1212
public static readonly DependencyProperty DeferredContentTemplateProperty =
13-
DependencyProperty.Register("DeferredContentTemplate",
14-
typeof(DataTemplate), typeof(DeferredContent), null);
13+
DependencyProperty.Register(
14+
"DeferredContentTemplate",
15+
typeof(DataTemplate),
16+
typeof(DeferredContent),
17+
null);
1518

1619
public DataTemplate DeferredContentTemplate
1720
{

0 commit comments

Comments
 (0)