Skip to content

Commit fc346b5

Browse files
authored
Format code with csharpier (#1330)
* Format code with csharpier * Format code
1 parent 1b892e3 commit fc346b5

File tree

110 files changed

+355
-329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+355
-329
lines changed

docs/codesnippet/Rtf/RtfDocumentProcessor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public FileModel Load(FileAndType file, ImmutableDictionary<string, object> meta
5151
EnvironmentContext.FileAbstractLayer.GetPhysicalPath(file.File)
5252
);
5353

54-
return new FileModel(file, content) { LocalPathFromRoot = localPathFromRoot, };
54+
return new FileModel(file, content) { LocalPathFromRoot = localPathFromRoot };
5555
}
5656
#endregion
5757

samples/Wpf.Ui.Demo.Console/Views/Pages/DataPage.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private void InitializeData()
4141
(byte)random.Next(0, 250),
4242
(byte)random.Next(0, 250)
4343
)
44-
)
44+
),
4545
}
4646
);
4747
}

samples/Wpf.Ui.Demo.Dialogs/MainWindow.xaml.cs

+8-9
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@ private async void OnShowDialogClick(object sender, RoutedEventArgs e)
2727
private async Task ShowSampleDialogAsync()
2828
{
2929
// Defining dialog object
30-
ContentDialog myDialog =
31-
new()
32-
{
33-
Title = "My sample dialog",
34-
Content = "Content of the dialog",
35-
CloseButtonText = "Close button",
36-
PrimaryButtonText = "Primary button",
37-
SecondaryButtonText = "Secondary button"
38-
};
30+
ContentDialog myDialog = new()
31+
{
32+
Title = "My sample dialog",
33+
Content = "Content of the dialog",
34+
CloseButtonText = "Close button",
35+
PrimaryButtonText = "Primary button",
36+
SecondaryButtonText = "Secondary button",
37+
};
3938

4039
// Setting the dialog container
4140
myDialog.DialogHost = ContentPresenterForDialogs;

samples/Wpf.Ui.Demo.Mvvm/ViewModels/DataViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private void InitializeViewModel()
4040
(byte)random.Next(0, 250),
4141
(byte)random.Next(0, 250)
4242
)
43-
)
43+
),
4444
}
4545
);
4646
}

samples/Wpf.Ui.Demo.Mvvm/ViewModels/MainWindowViewModel.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ private void InitializeViewModel()
4747
{
4848
Content = "Home",
4949
Icon = new SymbolIcon { Symbol = SymbolRegular.Home24 },
50-
TargetPageType = typeof(Views.Pages.DashboardPage)
50+
TargetPageType = typeof(Views.Pages.DashboardPage),
5151
},
5252
new NavigationViewItem()
5353
{
5454
Content = "Data",
5555
Icon = new SymbolIcon { Symbol = SymbolRegular.DataHistogram24 },
56-
TargetPageType = typeof(Views.Pages.DataPage)
56+
TargetPageType = typeof(Views.Pages.DataPage),
5757
},
5858
];
5959

@@ -63,7 +63,7 @@ private void InitializeViewModel()
6363
{
6464
Content = "Settings",
6565
Icon = new SymbolIcon { Symbol = SymbolRegular.Settings24 },
66-
TargetPageType = typeof(Views.Pages.SettingsPage)
66+
TargetPageType = typeof(Views.Pages.SettingsPage),
6767
},
6868
];
6969

samples/Wpf.Ui.Demo.Simple/Views/Pages/DataPage.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private void InitializeData()
4141
(byte)random.Next(0, 250),
4242
(byte)random.Next(0, 250)
4343
)
44-
)
44+
),
4545
}
4646
);
4747
}

src/Wpf.Ui.Gallery/Controls/PageControlDocumentation.xaml.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,12 @@ private void OnClick(string? param)
151151

152152
string navigationUrl = param switch
153153
{
154-
"doc" when GetDocumentationType(_page) is { } documentationType
155-
=> CreateUrlForDocumentation(documentationType),
154+
"doc" when GetDocumentationType(_page) is { } documentationType => CreateUrlForDocumentation(
155+
documentationType
156+
),
156157
"xaml" => CreateUrlForGithub(_page.GetType(), ".xaml"),
157158
"c#" => CreateUrlForGithub(_page.GetType(), ".xaml.cs"),
158-
_ => string.Empty
159+
_ => string.Empty,
159160
};
160161

161162
if (string.IsNullOrEmpty(navigationUrl))

src/Wpf.Ui.Gallery/Helpers/PaneDisplayModeToIndexConverter.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public object Convert(object? value, Type targetType, object? parameter, Culture
1616
NavigationViewPaneDisplayMode.LeftFluent => 1,
1717
NavigationViewPaneDisplayMode.Top => 2,
1818
NavigationViewPaneDisplayMode.Bottom => 3,
19-
_ => 0
19+
_ => 0,
2020
};
2121
}
2222

@@ -27,7 +27,7 @@ public object ConvertBack(object? value, Type targetType, object? parameter, Cul
2727
1 => NavigationViewPaneDisplayMode.LeftFluent,
2828
2 => NavigationViewPaneDisplayMode.Top,
2929
3 => NavigationViewPaneDisplayMode.Bottom,
30-
_ => NavigationViewPaneDisplayMode.Left
30+
_ => NavigationViewPaneDisplayMode.Left,
3131
};
3232
}
3333
}

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.Gallery/ViewModels/Pages/AllControlsViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public partial class AllControlsViewModel : ViewModel
1919
Name = x.Name,
2020
Icon = x.Icon,
2121
Description = x.Description,
22-
PageType = x.PageType
22+
PageType = x.PageType,
2323
})
2424
.OrderBy(x => x.Name)
2525
);

src/Wpf.Ui.Gallery/ViewModels/Pages/BasicInput/BasicInputViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public partial class BasicInputViewModel : ViewModel
2020
Name = x.Name,
2121
Icon = x.Icon,
2222
Description = x.Description,
23-
PageType = x.PageType
23+
PageType = x.PageType,
2424
})
2525
);
2626
}

src/Wpf.Ui.Gallery/ViewModels/Pages/BasicInput/CheckBoxViewModel.cs

+4-5
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@ private void OnSingleChecked(string option)
5353
bool allUnchecked =
5454
!OptionOneCheckBoxChecked && !OptionTwoCheckBoxChecked && !OptionThreeCheckBoxChecked;
5555

56-
SelectAllCheckBoxChecked = allChecked
57-
? true
58-
: allUnchecked
59-
? false
60-
: (bool?)null;
56+
SelectAllCheckBoxChecked =
57+
allChecked ? true
58+
: allUnchecked ? false
59+
: (bool?)null;
6160
}
6261
}

src/Wpf.Ui.Gallery/ViewModels/Pages/BasicInput/ComboBoxViewModel.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public partial class ComboBoxViewModel : ViewModel
1313
"Arial",
1414
"Comic Sans MS",
1515
"Segoe UI",
16-
"Times New Roman"
16+
"Times New Roman",
1717
];
1818

1919
[ObservableProperty]
@@ -32,6 +32,6 @@ public partial class ComboBoxViewModel : ViewModel
3232
28,
3333
36,
3434
48,
35-
72
35+
72,
3636
];
3737
}

src/Wpf.Ui.Gallery/ViewModels/Pages/BasicInput/ThumbRateViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public ThumbRateState ThumbRateState
2626
{
2727
ThumbRateState.Liked => "Liked",
2828
ThumbRateState.Disliked => "Disliked",
29-
_ => "None"
29+
_ => "None",
3030
};
3131

3232
ThumRateStateCodeText = $"<ui:ThumbRate State=\"{ThumRateStateText}\" />";

src/Wpf.Ui.Gallery/ViewModels/Pages/Collections/CollectionsViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public partial class CollectionsViewModel : ViewModel
2020
Name = x.Name,
2121
Icon = x.Icon,
2222
Description = x.Description,
23-
PageType = x.PageType
23+
PageType = x.PageType,
2424
})
2525
);
2626
}

src/Wpf.Ui.Gallery/ViewModels/Pages/Collections/DataGridViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ private static ObservableCollection<Product> GenerateProducts()
3535
Unit = units[random.Next(0, units.Length)],
3636
UnitPrice = Math.Round(random.NextDouble() * 20.0, 3),
3737
UnitsInStock = random.Next(0, 100),
38-
IsVirtual = random.Next(0, 2) == 1
38+
IsVirtual = random.Next(0, 2) == 1,
3939
}
4040
);
4141
}

src/Wpf.Ui.Gallery/ViewModels/Pages/Collections/ListBoxViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ public partial class ListBoxViewModel : ViewModel
1414
"Comic Sans MS",
1515
"Courier New",
1616
"Segoe UI",
17-
"Times New Roman"
17+
"Times New Roman",
1818
];
1919
}

src/Wpf.Ui.Gallery/ViewModels/Pages/Collections/ListViewViewModel.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private static ObservableCollection<Person> GeneratePersons()
4848
"Arielle",
4949
"Arielle",
5050
"Jamie",
51-
"Alexzander"
51+
"Alexzander",
5252
};
5353
var surnames = new[]
5454
{
@@ -64,7 +64,7 @@ private static ObservableCollection<Person> GeneratePersons()
6464
"Banks",
6565
"Hood",
6666
"Fry",
67-
"Carroll"
67+
"Carroll",
6868
};
6969
var companies = new[]
7070
{
@@ -74,7 +74,7 @@ private static ObservableCollection<Person> GeneratePersons()
7474
"Megabyte Computers Inc",
7575
"Roude Mics",
7676
"XD Projekt Red S.A.",
77-
"Lepo.co"
77+
"Lepo.co",
7878
};
7979

8080
for (int i = 0; i < 50; i++)
@@ -97,7 +97,7 @@ private void UpdateListViewSelectionMode(int selectionModeIndex)
9797
{
9898
1 => SelectionMode.Multiple,
9999
2 => SelectionMode.Extended,
100-
_ => SelectionMode.Single
100+
_ => SelectionMode.Single,
101101
};
102102
}
103103
}

src/Wpf.Ui.Gallery/ViewModels/Pages/DateAndTime/DateAndTimeViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public partial class DateAndTimeViewModel : ViewModel
2020
Name = x.Name,
2121
Icon = x.Icon,
2222
Description = x.Description,
23-
PageType = x.PageType
23+
PageType = x.PageType,
2424
})
2525
);
2626
}

src/Wpf.Ui.Gallery/ViewModels/Pages/DesignGuidance/IconsViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public IconsViewModel()
7373
Name = iconName,
7474
Icon = icon,
7575
Symbol = ((char)icon).ToString(),
76-
Code = ((int)icon).ToString("X4")
76+
Code = ((int)icon).ToString("X4"),
7777
}
7878
);
7979
}

src/Wpf.Ui.Gallery/ViewModels/Pages/DialogsAndFlyouts/ContentDialogViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private async Task OnShowDialog(object content)
3232
{
3333
ContentDialogResult.Primary => "User saved their work",
3434
ContentDialogResult.Secondary => "User did not save their work",
35-
_ => "User cancelled the dialog"
35+
_ => "User cancelled the dialog",
3636
};
3737
}
3838

src/Wpf.Ui.Gallery/ViewModels/Pages/DialogsAndFlyouts/DialogsAndFlyoutsViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public partial class DialogsAndFlyoutsViewModel : ViewModel
2020
Name = x.Name,
2121
Icon = x.Icon,
2222
Description = x.Description,
23-
PageType = x.PageType
23+
PageType = x.PageType,
2424
})
2525
);
2626
}

src/Wpf.Ui.Gallery/ViewModels/Pages/DialogsAndFlyouts/SnackbarViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private void UpdateSnackbarAppearance(int appearanceIndex)
5050
6 => ControlAppearance.Light,
5151
7 => ControlAppearance.Dark,
5252
8 => ControlAppearance.Transparent,
53-
_ => ControlAppearance.Primary
53+
_ => ControlAppearance.Primary,
5454
};
5555
}
5656
}

src/Wpf.Ui.Gallery/ViewModels/Pages/Layout/LayoutViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public partial class LayoutViewModel : ViewModel
2020
Name = x.Name,
2121
Icon = x.Icon,
2222
Description = x.Description,
23-
PageType = x.PageType
23+
PageType = x.PageType,
2424
})
2525
);
2626
}

src/Wpf.Ui.Gallery/ViewModels/Pages/Media/MediaViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public partial class MediaViewModel : ViewModel
2020
Name = x.Name,
2121
Icon = x.Icon,
2222
Description = x.Description,
23-
PageType = x.PageType
23+
PageType = x.PageType,
2424
})
2525
);
2626
}

src/Wpf.Ui.Gallery/ViewModels/Pages/Navigation/BreadcrumbBarViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public partial class BreadcrumbBarViewModel : ViewModel
2727
"Images",
2828
"Folder1",
2929
"Folder2",
30-
"Folder3"
30+
"Folder3",
3131
];
3232

3333
[ObservableProperty]

src/Wpf.Ui.Gallery/ViewModels/Pages/Navigation/NavigationViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public partial class NavigationViewModel : ViewModel
2020
Name = x.Name,
2121
Icon = x.Icon,
2222
Description = x.Description,
23-
PageType = x.PageType
23+
PageType = x.PageType,
2424
})
2525
);
2626
}

0 commit comments

Comments
 (0)