diff --git a/samples/Wpf.Ui.Demo.Mvvm/Views/MainWindow.xaml.cs b/samples/Wpf.Ui.Demo.Mvvm/Views/MainWindow.xaml.cs index c5a712452..86e7c71ab 100644 --- a/samples/Wpf.Ui.Demo.Mvvm/Views/MainWindow.xaml.cs +++ b/samples/Wpf.Ui.Demo.Mvvm/Views/MainWindow.xaml.cs @@ -15,10 +15,7 @@ public partial class MainWindow : INavigationWindow { public ViewModels.MainWindowViewModel ViewModel { get; } - public MainWindow( - ViewModels.MainWindowViewModel viewModel, - INavigationService navigationService - ) + public MainWindow(ViewModels.MainWindowViewModel viewModel, INavigationService navigationService) { ViewModel = viewModel; DataContext = this; diff --git a/src/Wpf.Ui/Controls/MessageBox/MessageBox.cs b/src/Wpf.Ui/Controls/MessageBox/MessageBox.cs index 579fc5a97..0e37bcb1e 100644 --- a/src/Wpf.Ui/Controls/MessageBox/MessageBox.cs +++ b/src/Wpf.Ui/Controls/MessageBox/MessageBox.cs @@ -4,12 +4,12 @@ // All Rights Reserved. using System.Reflection; -#if NET8_0_OR_GREATER -using System.Runtime.CompilerServices; -#endif using Wpf.Ui.Input; using Wpf.Ui.Interop; using Size = System.Windows.Size; +#if NET8_0_OR_GREATER +using System.Runtime.CompilerServices; +#endif // ReSharper disable once CheckNamespace namespace Wpf.Ui.Controls; @@ -236,8 +236,10 @@ public bool IsPrimaryButtonEnabled /// public IRelayCommand TemplateButtonCommand => (IRelayCommand)GetValue(TemplateButtonCommandProperty); - private static readonly PropertyInfo CanCenterOverWPFOwnerPropertyInfo = - typeof(Window).GetProperty("CanCenterOverWPFOwner", BindingFlags.NonPublic | BindingFlags.Instance)!; + private static readonly PropertyInfo CanCenterOverWPFOwnerPropertyInfo = typeof(Window).GetProperty( + "CanCenterOverWPFOwner", + BindingFlags.NonPublic | BindingFlags.Instance + )!; /// /// Initializes a new instance of the class. @@ -333,8 +335,10 @@ protected virtual void OnLoaded() CenterWindowOnScreen(); break; case WindowStartupLocation.CenterOwner: - if (!CanCenterOverWPFOwner() || - Owner.WindowState is WindowState.Maximized or WindowState.Minimized) + if ( + !CanCenterOverWPFOwner() + || Owner.WindowState is WindowState.Maximized or WindowState.Minimized + ) { CenterWindowOnScreen(); } @@ -344,7 +348,8 @@ protected virtual void OnLoaded() } break; - default: throw new InvalidOperationException(); + default: + throw new InvalidOperationException(); } } @@ -352,7 +357,7 @@ protected virtual void OnLoaded() private bool CanCenterOverWPFOwner() { #if NET8_0_OR_GREATER - return CanCenterOverWPFOwnerAccessor(this); + return CanCenterOverWPFOwnerAccessor(this); #else return (bool)CanCenterOverWPFOwnerPropertyInfo.GetValue(this)!; #endif