Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main branch from development, bump version to 3.0.0-preview.8 #793

Merged
merged 48 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c1081cc
update ToggleSwitch add OffContent OnContent
a3305 Apr 23, 2023
d312d75
Implement PassiveScrollViewer; replace ScrollViewer in all XAML controls
koal44 Sep 14, 2023
4e72eb8
Implement PassiveScrollViewer; replace ScrollViewer in all XAML controls
koal44 Sep 14, 2023
644ad5b
Merge branch 'feature/passive-scrollviewer' of https://github.com/koa…
koal44 Sep 20, 2023
4ec0d7e
Update dpi awareness schema uri in app.manifest
redstripes89 Oct 12, 2023
3e245a2
Update dpi awareness schema uri in app.manifest
redstripes89 Oct 12, 2023
5c2260a
Update dpi awareness schema uri in app.manifest
redstripes89 Oct 12, 2023
e238c95
Update dpi awareness schema uri in app.manifest
redstripes89 Oct 12, 2023
cef4ac2
Update dpi awareness schema uri in app.manifest
redstripes89 Oct 12, 2023
4163516
Update dpi awareness schema uri in app.manifest
redstripes89 Oct 12, 2023
cf8468a
Proof of concept for Button.xaml
niels9001 Oct 17, 2023
841ea4a
Calendar
niels9001 Oct 19, 2023
73ffd8d
CheckBox
niels9001 Oct 19, 2023
0c6d81b
Fix elevation borderbrush for Light theme
niels9001 Oct 19, 2023
aff9985
ComboBox
niels9001 Oct 19, 2023
703b04c
ContentDialog
niels9001 Oct 19, 2023
8de3e3f
ContextMenu
niels9001 Oct 19, 2023
e3abc12
ScrollBar
niels9001 Oct 19, 2023
5e15adf
FluentWindow
niels9001 Oct 19, 2023
73b4bef
Flyout
niels9001 Oct 19, 2023
fa43298
HyperlinkButton
niels9001 Oct 19, 2023
c60c703
InfoBar
niels9001 Oct 19, 2023
d1b2f98
Label and ListBox
niels9001 Oct 19, 2023
1316116
ListView
niels9001 Oct 19, 2023
57e7488
LoadingScreen
niels9001 Oct 19, 2023
161eee7
MessageBox
niels9001 Oct 19, 2023
cc7b30c
NavigationView
niels9001 Oct 20, 2023
976dfc1
Menu
niels9001 Oct 20, 2023
130359f
TextBox
niels9001 Oct 20, 2023
0008801
AutoSuggestBox
niels9001 Oct 20, 2023
423ad68
NumberBox and PasswordBox
niels9001 Oct 20, 2023
5f51584
ThumbRate
niels9001 Oct 21, 2023
87be5aa
Button fix
niels9001 Oct 22, 2023
1ce547c
XAML styling
niels9001 Oct 22, 2023
64a4c83
Fix crash
niels9001 Oct 22, 2023
45aa352
Merge pull request #788 from niels9001/niels9001/color-management
pomianowski Oct 22, 2023
bdff9f9
Merge pull request #785 from redstripes89/dev_dpi_awareness
pomianowski Oct 22, 2023
c13a0ee
Merge branch 'development' into feature/passive-scrollviewer
pomianowski Oct 22, 2023
dd2ee94
Merge pull request #762 from koal44/feature/passive-scrollviewer
pomianowski Oct 22, 2023
cf3e7bf
Merge branch 'development' of https://github.com/lepoco/wpfui into pr…
pomianowski Oct 22, 2023
554955e
Disable ToolboxItem features
pomianowski Oct 22, 2023
7229407
Merge pull request #602 from zh3305/update_ToggleSwitch
pomianowski Oct 22, 2023
35aee20
Fix `ToggleSwitch` gallery page
pomianowski Oct 22, 2023
2a54ef4
Update settings page according to the #788
pomianowski Oct 22, 2023
8ad76b8
Simplify `SnackbarService`
pomianowski Oct 22, 2023
cd53252
Bump version
pomianowski Oct 22, 2023
f63c995
Merge pull request #792 from lepoco/bugfix/gallery-theme
pomianowski Oct 22, 2023
763174b
Merge branch 'main' into development
pomianowski Oct 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .csharpierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"printWidth": 130,
"printWidth": 110,
"useTabs": false,
"tabWidth": 4,
"preprocessorSymbolSets": [
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Version>3.0.0-preview.7</Version>
<Version>3.0.0-preview.8</Version>
<LangVersion>11.0</LangVersion>
<Deterministic>true</Deterministic>
</PropertyGroup>
Expand Down
6 changes: 5 additions & 1 deletion docs/codesnippet/Rtf/RtfDocumentProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ public FileModel Load(FileAndType file, ImmutableDictionary<string, object> meta
#region Save
public SaveResult Save(FileModel model)
{
return new SaveResult { DocumentType = "Conceptual", FileWithoutExtension = Path.ChangeExtension(model.File, null), };
return new SaveResult
{
DocumentType = "Conceptual",
FileWithoutExtension = Path.ChangeExtension(model.File, null),
};
}
#endregion

Expand Down
3 changes: 2 additions & 1 deletion src/Wpf.Ui.Demo.Mvvm/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public partial class App
/// </summary>
/// <typeparam name="T">Type of the service to get.</typeparam>
/// <returns>Instance of the service or <see langword="null"/>.</returns>
public static T? GetService<T>() where T : class
public static T? GetService<T>()
where T : class
{
return _host.Services.GetService(typeof(T)) as T;
}
Expand Down
4 changes: 3 additions & 1 deletion src/Wpf.Ui.Demo.Mvvm/Services/ApplicationHostService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ private async Task HandleActivationAsync()

if (!Application.Current.Windows.OfType<MainWindow>().Any())
{
_navigationWindow = (_serviceProvider.GetService(typeof(INavigationWindow)) as INavigationWindow)!;
_navigationWindow = (
_serviceProvider.GetService(typeof(INavigationWindow)) as INavigationWindow
)!;
_navigationWindow!.ShowWindow();

_navigationWindow.Navigate(typeof(Views.Pages.DashboardPage));
Expand Down
3 changes: 2 additions & 1 deletion src/Wpf.Ui.Demo.Mvvm/Services/PageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public PageService(IServiceProvider serviceProvider)
}

/// <inheritdoc />
public T? GetPage<T>() where T : class
public T? GetPage<T>()
where T : class
{
if (!typeof(FrameworkElement).IsAssignableFrom(typeof(T)))
throw new InvalidOperationException("The page should be a WPF control.");
Expand Down
7 changes: 6 additions & 1 deletion src/Wpf.Ui.Demo.Mvvm/ViewModels/DataViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ private void InitializeViewModel()
new DataColor
{
Color = new SolidColorBrush(
Color.FromArgb((byte)200, (byte)random.Next(0, 250), (byte)random.Next(0, 250), (byte)random.Next(0, 250))
Color.FromArgb(
(byte)200,
(byte)random.Next(0, 250),
(byte)random.Next(0, 250),
(byte)random.Next(0, 250)
)
)
}
);
Expand Down
8 changes: 6 additions & 2 deletions src/Wpf.Ui.Demo.Mvvm/ViewModels/SettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ public partial class SettingsViewModel : ObservableObject, INavigationAware
private string _appVersion = String.Empty;

[ObservableProperty]
private Wpf.Ui.Appearance.ApplicationTheme _currentApplicationTheme = Wpf.Ui.Appearance.ApplicationTheme.Unknown;
private Wpf.Ui.Appearance.ApplicationTheme _currentApplicationTheme = Wpf.Ui
.Appearance
.ApplicationTheme
.Unknown;

public void OnNavigatedTo()
{
Expand All @@ -35,7 +38,8 @@ private void InitializeViewModel()

private string GetAssemblyVersion()
{
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? String.Empty;
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version?.ToString()
?? String.Empty;
}

[RelayCommand]
Expand Down
6 changes: 5 additions & 1 deletion src/Wpf.Ui.Demo.Mvvm/Views/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ public partial class MainWindow : INavigationWindow
{
public ViewModels.MainWindowViewModel ViewModel { get; }

public MainWindow(ViewModels.MainWindowViewModel viewModel, IPageService pageService, INavigationService navigationService)
public MainWindow(
ViewModels.MainWindowViewModel viewModel,
IPageService pageService,
INavigationService navigationService
)
{
ViewModel = viewModel;
DataContext = this;
Expand Down
4 changes: 2 additions & 2 deletions src/Wpf.Ui.Demo.Mvvm/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="https://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
<dpiAware xmlns="https://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
Expand Down
5 changes: 4 additions & 1 deletion src/Wpf.Ui.Demo.Simple/Views/Pages/DashboardPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public DashboardPage()

private void OnBaseButtonClick(object sender, RoutedEventArgs e)
{
CounterTextBlock.SetCurrentValue(System.Windows.Controls.TextBlock.TextProperty, (++_counter).ToString());
CounterTextBlock.SetCurrentValue(
System.Windows.Controls.TextBlock.TextProperty,
(++_counter).ToString()
);
}
}
7 changes: 6 additions & 1 deletion src/Wpf.Ui.Demo.Simple/Views/Pages/DataPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ private void InitializeData()
new DataColor
{
Color = new SolidColorBrush(
Color.FromArgb((byte)200, (byte)random.Next(0, 250), (byte)random.Next(0, 250), (byte)random.Next(0, 250))
Color.FromArgb(
(byte)200,
(byte)random.Next(0, 250),
(byte)random.Next(0, 250),
(byte)random.Next(0, 250)
)
)
}
);
Expand Down
3 changes: 2 additions & 1 deletion src/Wpf.Ui.Demo.Simple/Views/Pages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ private void OnDarkThemeRadioButtonChecked(object sender, RoutedEventArgs e)

private string GetAssemblyVersion()
{
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? String.Empty;
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version?.ToString()
?? String.Empty;
}
}
4 changes: 2 additions & 2 deletions src/Wpf.Ui.Demo.Simple/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="https://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
<dpiAware xmlns="https://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
Expand Down
4 changes: 2 additions & 2 deletions src/Wpf.Ui.Extension.Template.Blank/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="https://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
<dpiAware xmlns="https://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
Expand Down
4 changes: 2 additions & 2 deletions src/Wpf.Ui.Extension.Template.Compact/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="https://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
<dpiAware xmlns="https://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
Expand Down
4 changes: 2 additions & 2 deletions src/Wpf.Ui.Extension.Template.Fluent/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="https://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
<dpiAware xmlns="https://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
Expand Down
10 changes: 8 additions & 2 deletions src/Wpf.Ui.FontMapper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ async Task FetchFontContents(FontSource source, string version)
await httpClient.GetFromJsonAsync<Dictionary<string, long>>(source.SourcePath)
?? throw new Exception("Unable to obtain JSON data");

sourceJsonContent = sourceJsonContent.OrderBy(x => x.Value).ToDictionary(k => FormatIconName(k.Key), v => v.Value);
sourceJsonContent = sourceJsonContent
.OrderBy(x => x.Value)
.ToDictionary(k => FormatIconName(k.Key), v => v.Value);

source.SetContents(sourceJsonContent);
source.UpdateVersion(version);
Expand Down Expand Up @@ -144,7 +146,11 @@ async Task WriteToFile(FontSource singleFont, string fileRootDirectory)
_ = enumMapStringBuilder.AppendLine($" {singleIcon.Key} = 0x{singleIcon.Value:X},");
}

_ = enumMapStringBuilder.AppendLine("}").AppendLine(String.Empty).AppendLine("#pragma warning restore CS1591").Append("\r\n");
_ = enumMapStringBuilder
.AppendLine("}")
.AppendLine(String.Empty)
.AppendLine("#pragma warning restore CS1591")
.Append("\r\n");

var fileInfo = new FileInfo(destinationPath);

Expand Down
2 changes: 2 additions & 0 deletions src/Wpf.Ui.Gallery/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
</ResourceDictionary.MergedDictionaries>

<helpers:EnumToBooleanConverter x:Key="EnumToBooleanConverter" />
<helpers:ThemeToIndexConverter x:Key="ThemeToIndexConverter" />
<helpers:PaneDisplayModeToIndexConverter x:Key="PaneDisplayModeToIndexConverter" />

</ResourceDictionary>
</Application.Resources>
Expand Down
3 changes: 2 additions & 1 deletion src/Wpf.Ui.Gallery/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public partial class App
/// </summary>
/// <typeparam name="T">Type of the service to get.</typeparam>
/// <returns>Instance of the service or <see langword="null"/>.</returns>
public static T GetRequiredService<T>() where T : class
public static T GetRequiredService<T>()
where T : class
{
return _host.Services.GetRequiredService<T>();
}
Expand Down
7 changes: 5 additions & 2 deletions src/Wpf.Ui.Gallery/Controllers/MonacoController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ await _webView.ExecuteScriptAsync(

public async Task SetLanguageAsync(MonacoLanguage monacoLanguage)
{
var languageId = monacoLanguage == MonacoLanguage.ObjectiveC ? "objective-c" : monacoLanguage.ToString().ToLower();
var languageId =
monacoLanguage == MonacoLanguage.ObjectiveC ? "objective-c" : monacoLanguage.ToString().ToLower();

await _webView.ExecuteScriptAsync("monaco.editor.setModelLanguage(" + EditorObject + $".getModel(), \"{languageId}\");");
await _webView.ExecuteScriptAsync(
"monaco.editor.setModelLanguage(" + EditorObject + $".getModel(), \"{languageId}\");"
);
}

public async Task SetContentAsync(string contents)
Expand Down
10 changes: 8 additions & 2 deletions src/Wpf.Ui.Gallery/Controls/ControlExample.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ public class ControlExample : Control
nameof(XamlCodeSource),
typeof(Uri),
typeof(ControlExample),
new PropertyMetadata(null, static (o, args) => ((ControlExample)o).OnXamlCodeSourceChanged((Uri)args.NewValue))
new PropertyMetadata(
null,
static (o, args) => ((ControlExample)o).OnXamlCodeSourceChanged((Uri)args.NewValue)
)
);

public static readonly DependencyProperty CsharpCodeProperty = DependencyProperty.Register(
Expand All @@ -49,7 +52,10 @@ public class ControlExample : Control
nameof(CsharpCodeSource),
typeof(Uri),
typeof(ControlExample),
new PropertyMetadata(null, static (o, args) => ((ControlExample)o).OnCsharpCodeSourceChanged((Uri)args.NewValue))
new PropertyMetadata(
null,
static (o, args) => ((ControlExample)o).OnCsharpCodeSourceChanged((Uri)args.NewValue)
)
);

public string? HeaderText
Expand Down
24 changes: 15 additions & 9 deletions src/Wpf.Ui.Gallery/Controls/PageControlDocumentation.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public class PageControlDocumentation : Control

public static void SetShow(FrameworkElement target, bool show) => target.SetValue(ShowProperty, show);

public static Type? GetDocumentationType(FrameworkElement target) => (Type?)target.GetValue(DocumentationTypeProperty);
public static Type? GetDocumentationType(FrameworkElement target) =>
(Type?)target.GetValue(DocumentationTypeProperty);

public static void SetDocumentationType(FrameworkElement target, Type type) =>
target.SetValue(DocumentationTypeProperty, type);
Expand All @@ -40,12 +41,13 @@ public static void SetDocumentationType(FrameworkElement target, Type type) =>
new FrameworkPropertyMetadata(null)
);

public static readonly DependencyProperty IsDocumentationLinkVisibleProperty = DependencyProperty.Register(
nameof(IsDocumentationLinkVisible),
typeof(Visibility),
typeof(PageControlDocumentation),
new FrameworkPropertyMetadata(Visibility.Collapsed)
);
public static readonly DependencyProperty IsDocumentationLinkVisibleProperty =
DependencyProperty.Register(
nameof(IsDocumentationLinkVisible),
typeof(Visibility),
typeof(PageControlDocumentation),
new FrameworkPropertyMetadata(Visibility.Collapsed)
);

public static readonly DependencyProperty TemplateButtonCommandProperty = DependencyProperty.Register(
nameof(TemplateButtonCommand),
Expand Down Expand Up @@ -73,7 +75,10 @@ public PageControlDocumentation()
Loaded += static (sender, _) => ((PageControlDocumentation)sender).OnLoaded();
Unloaded += static (sender, _) => ((PageControlDocumentation)sender).OnUnloaded();

SetValue(TemplateButtonCommandProperty, new CommunityToolkit.Mvvm.Input.RelayCommand<string>(OnClick));
SetValue(
TemplateButtonCommandProperty,
new CommunityToolkit.Mvvm.Input.RelayCommand<string>(OnClick)
);
}

private FrameworkElement? _page;
Expand Down Expand Up @@ -127,7 +132,8 @@ private void OnClick(string? param)

string navigationUrl = param switch
{
"doc" when GetDocumentationType(_page) is { } documentationType => CreateUrlForDocumentation(documentationType),
"doc" when GetDocumentationType(_page) is { } documentationType
=> CreateUrlForDocumentation(documentationType),
"xaml" => CreateUrlForGithub(_page.GetType(), ".xaml"),
"c#" => CreateUrlForGithub(_page.GetType(), ".xaml.cs"),
_ => String.Empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ namespace Wpf.Ui.Gallery.Controls;

public partial class TermsOfUseContentDialog : ContentDialog
{
public TermsOfUseContentDialog(ContentPresenter contentPresenter) : base(contentPresenter)
public TermsOfUseContentDialog(ContentPresenter contentPresenter)
: base(contentPresenter)
{
InitializeComponent();
}
Expand Down
3 changes: 2 additions & 1 deletion src/Wpf.Ui.Gallery/Controls/TypographyControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public class TypographyControl : Control
typeof(TypographyControl),
new PropertyMetadata(
FontTypography.Body,
static (o, args) => ((TypographyControl)o).OnExampleFontTypographyChanged((FontTypography)args.NewValue)
static (o, args) =>
((TypographyControl)o).OnExampleFontTypographyChanged((FontTypography)args.NewValue)
)
);

Expand Down
6 changes: 5 additions & 1 deletion src/Wpf.Ui.Gallery/ControlsLookup/ControlPages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ static class ControlPages

public static IEnumerable<GalleryPage> All()
{
foreach (var type in GalleryAssembly.Asssembly.GetTypes().Where(t => t.IsDefined(typeof(GalleryPageAttribute))))
foreach (
var type in GalleryAssembly.Asssembly
.GetTypes()
.Where(t => t.IsDefined(typeof(GalleryPageAttribute)))
)
{
var galleryPageAttribute = type.GetCustomAttributes<GalleryPageAttribute>().FirstOrDefault();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ params Assembly[] assemblies
{
IEnumerable<Type> types = assembly
.GetTypes()
.Where(x => x.IsClass && x.Namespace!.StartsWith(namespaceName, StringComparison.InvariantCultureIgnoreCase));
.Where(
x =>
x.IsClass
&& x.Namespace!.StartsWith(namespaceName, StringComparison.InvariantCultureIgnoreCase)
);

foreach (Type? type in types)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Wpf.Ui.Gallery/Helpers/EnumToBooleanConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Wpf.Ui.Gallery.Helpers;

internal class EnumToBooleanConverter : IValueConverter
internal sealed class EnumToBooleanConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Wpf.Ui.Gallery/Helpers/NameToPageTypeConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Wpf.Ui.Gallery.Helpers;

internal class NameToPageTypeConverter
internal sealed class NameToPageTypeConverter
{
private static readonly Type[] PageTypes = Assembly
.GetExecutingAssembly()
Expand Down
Loading
Loading