Skip to content

Commit 902e54d

Browse files
committed
Format code
1 parent 43a7f88 commit 902e54d

File tree

5 files changed

+46
-21
lines changed

5 files changed

+46
-21
lines changed

src/Wpf.Ui.Gallery/Models/Unit.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ public enum Unit
99
{
1010
Grams,
1111
Kilograms,
12-
Milliliters
12+
Milliliters,
1313
}

src/Wpf.Ui/Controls/CardAction/CardAction.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ protected override AutomationPeer OnCreateAutomationPeer()
5555
{
5656
return new CardActionAutomationPeer(this);
5757
}
58-
}
58+
}

src/Wpf.Ui/Controls/DataGrid/DataGrid.cs

+27-13
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,12 @@ public class DataGrid : System.Windows.Controls.DataGrid
5959
);
6060

6161
/// <summary>Identifies the <see cref="TextColumnElementStyle"/> dependency property.</summary>
62-
public static readonly DependencyProperty TextColumnElementStyleProperty =
63-
DependencyProperty.Register(
64-
nameof(TextColumnElementStyle),
65-
typeof(Style),
66-
typeof(DataGrid),
67-
new FrameworkPropertyMetadata(null)
68-
);
62+
public static readonly DependencyProperty TextColumnElementStyleProperty = DependencyProperty.Register(
63+
nameof(TextColumnElementStyle),
64+
typeof(Style),
65+
typeof(DataGrid),
66+
new FrameworkPropertyMetadata(null)
67+
);
6968

7069
/// <summary>Identifies the <see cref="TextColumnEditingElementStyle"/> dependency property.</summary>
7170
public static readonly DependencyProperty TextColumnEditingElementStyleProperty =
@@ -165,7 +164,11 @@ private void UpdateSingleColumn(DataGridColumn dataGridColumn)
165164
_ = BindingOperations.SetBinding(
166165
checkBoxColumn,
167166
DataGridBoundColumn.ElementStyleProperty,
168-
new Binding { Path = new PropertyPath(CheckBoxColumnElementStyleProperty), Source = this }
167+
new Binding
168+
{
169+
Path = new PropertyPath(CheckBoxColumnElementStyleProperty),
170+
Source = this,
171+
}
169172
);
170173
}
171174

@@ -179,7 +182,8 @@ private void UpdateSingleColumn(DataGridColumn dataGridColumn)
179182
DataGridBoundColumn.EditingElementStyleProperty,
180183
new Binding
181184
{
182-
Path = new PropertyPath(CheckBoxColumnEditingElementStyleProperty), Source = this
185+
Path = new PropertyPath(CheckBoxColumnEditingElementStyleProperty),
186+
Source = this,
183187
}
184188
);
185189
}
@@ -195,7 +199,11 @@ private void UpdateSingleColumn(DataGridColumn dataGridColumn)
195199
_ = BindingOperations.SetBinding(
196200
comboBoxColumn,
197201
DataGridBoundColumn.ElementStyleProperty,
198-
new Binding { Path = new PropertyPath(ComboBoxColumnElementStyleProperty), Source = this }
202+
new Binding
203+
{
204+
Path = new PropertyPath(ComboBoxColumnElementStyleProperty),
205+
Source = this,
206+
}
199207
);
200208
}
201209

@@ -209,7 +217,8 @@ private void UpdateSingleColumn(DataGridColumn dataGridColumn)
209217
DataGridBoundColumn.EditingElementStyleProperty,
210218
new Binding
211219
{
212-
Path = new PropertyPath(ComboBoxColumnEditingElementStyleProperty), Source = this
220+
Path = new PropertyPath(ComboBoxColumnEditingElementStyleProperty),
221+
Source = this,
213222
}
214223
);
215224
}
@@ -224,7 +233,8 @@ private void UpdateSingleColumn(DataGridColumn dataGridColumn)
224233
DataGridBoundColumn.EditingElementStyleProperty,
225234
new Binding
226235
{
227-
Path = new PropertyPath(ComboBoxColumnEditingElementStyleProperty), Source = this
236+
Path = new PropertyPath(ComboBoxColumnEditingElementStyleProperty),
237+
Source = this,
228238
}
229239
);
230240
}
@@ -252,7 +262,11 @@ private void UpdateSingleColumn(DataGridColumn dataGridColumn)
252262
_ = BindingOperations.SetBinding(
253263
textBoxColumn,
254264
DataGridBoundColumn.EditingElementStyleProperty,
255-
new Binding { Path = new PropertyPath(TextColumnEditingElementStyleProperty), Source = this }
265+
new Binding
266+
{
267+
Path = new PropertyPath(TextColumnEditingElementStyleProperty),
268+
Source = this,
269+
}
256270
);
257271
}
258272

src/Wpf.Ui/Controls/IconElement/FontIcon.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ protected override UIElement InitializeChildren()
117117
SetResourceReference(FontSizeProperty, "DefaultIconFontSize");
118118

119119
// If the FontSize is the default, set it to the parent's FontSize.
120-
if (VisualParent is not null && TextElement.GetFontSize(VisualParent) != SystemFonts.MessageFontSize)
120+
if (
121+
VisualParent is not null
122+
&& TextElement.GetFontSize(VisualParent) != SystemFonts.MessageFontSize
123+
)
121124
{
122125
SetCurrentValue(FontSizeProperty, TextElement.GetFontSize(VisualParent));
123126
}

src/Wpf.Ui/Controls/TitleBar/TitleBar.cs

+13-5
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class TitleBar : System.Windows.Controls.Control, IThemeControl
6262
typeof(TitleBar),
6363
new PropertyMetadata(null)
6464
);
65-
65+
6666
/// <summary>
6767
/// Property for <see cref="TrailingContent"/>.
6868
/// </summary>
@@ -229,7 +229,7 @@ public object Header
229229
get => GetValue(HeaderProperty);
230230
set => SetValue(HeaderProperty, value);
231231
}
232-
232+
233233
/// <summary>
234234
/// Gets or sets the content displayed in right side of the <see cref="TitleBar"/>.
235235
/// </summary>
@@ -411,8 +411,14 @@ public TitleBar()
411411

412412
_titleBlock = new TextBlock();
413413
_titleBlock.VerticalAlignment = VerticalAlignment.Center;
414-
_titleBlock.SetBinding(System.Windows.Controls.TextBlock.TextProperty, new Binding(nameof(Title)) { Source = this });
415-
_titleBlock.SetBinding(System.Windows.Controls.TextBlock.FontSizeProperty, new Binding(nameof(FontSize)) { Source = this });
414+
_titleBlock.SetBinding(
415+
System.Windows.Controls.TextBlock.TextProperty,
416+
new Binding(nameof(Title)) { Source = this }
417+
);
418+
_titleBlock.SetBinding(
419+
System.Windows.Controls.TextBlock.FontSizeProperty,
420+
new Binding(nameof(FontSize)) { Source = this }
421+
);
416422
Header = _titleBlock;
417423

418424
Loaded += OnLoaded;
@@ -653,7 +659,9 @@ or User32.WM.NCLBUTTONUP
653659

654660
if (headerLeftUIElement is not null && headerLeftUIElement != _titleBlock)
655661
{
656-
isMouseOverHeaderContent = headerLeftUIElement.IsMouseOverElement(lParam) || (headerRightUiElement?.IsMouseOverElement(lParam) ?? false);
662+
isMouseOverHeaderContent =
663+
headerLeftUIElement.IsMouseOverElement(lParam)
664+
|| (headerRightUiElement?.IsMouseOverElement(lParam) ?? false);
657665
}
658666
else
659667
{

0 commit comments

Comments
 (0)