diff --git a/src/ReactiveUI.Tests/Platforms/winforms/Mocks/FakeWinformViewModel.cs b/src/ReactiveUI.Tests/Platforms/winforms/Mocks/FakeWinformViewModel.cs index 2c486120bb..1ada5f64fb 100644 --- a/src/ReactiveUI.Tests/Platforms/winforms/Mocks/FakeWinformViewModel.cs +++ b/src/ReactiveUI.Tests/Platforms/winforms/Mocks/FakeWinformViewModel.cs @@ -3,6 +3,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. +using System.Windows.Forms; + namespace ReactiveUI.Tests.Winforms; /// diff --git a/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs b/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs index 3aaed781cf..c2bbba8f8f 100644 --- a/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs +++ b/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs @@ -5,7 +5,6 @@ using System.Globalization; using System.Reflection; -using System.Windows.Forms; namespace ReactiveUI.Winforms; @@ -87,12 +86,8 @@ public IObservable GetActivationForView(IActivatableView view) return Observable.Empty; } - private static bool GetIsDesignMode(Control control) - { - var isDesignMode = LicenseManager.UsageMode == LicenseUsageMode.Designtime || control.Site?.DesignMode == true || control.Parent?.Site?.DesignMode == true; - - return isDesignMode; - } + private static bool GetIsDesignMode(Control control) => + LicenseManager.UsageMode == LicenseUsageMode.Designtime || control.Site?.DesignMode == true || control.Parent?.Site?.DesignMode == true; private bool GetCachedIsDesignMode(Control control) { @@ -100,4 +95,4 @@ private bool GetCachedIsDesignMode(Control control) return _isDesignModeCache.Value; } -} \ No newline at end of file +} diff --git a/src/ReactiveUI.Winforms/ContentControlBindingHook.cs b/src/ReactiveUI.Winforms/ContentControlBindingHook.cs index abb739970f..352af66a92 100644 --- a/src/ReactiveUI.Winforms/ContentControlBindingHook.cs +++ b/src/ReactiveUI.Winforms/ContentControlBindingHook.cs @@ -3,8 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Windows.Forms; - namespace ReactiveUI.Winforms; /// @@ -37,4 +35,4 @@ public bool ExecuteHook(object? source, object target, Func diff --git a/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj b/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj index 607f7fbdce..8a2160ba4a 100644 --- a/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj +++ b/src/ReactiveUI.Winforms/ReactiveUI.Winforms.csproj @@ -20,7 +20,7 @@ - + diff --git a/src/ReactiveUI.Winforms/ReactiveUserControl.cs b/src/ReactiveUI.Winforms/ReactiveUserControl.cs index b3ffbbe3f8..6f5a49ad1b 100644 --- a/src/ReactiveUI.Winforms/ReactiveUserControl.cs +++ b/src/ReactiveUI.Winforms/ReactiveUserControl.cs @@ -3,8 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Windows.Forms; - namespace ReactiveUI.Winforms; /// @@ -49,4 +47,4 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } -} \ No newline at end of file +} diff --git a/src/ReactiveUI.Winforms/ReactiveUserControlNonGeneric.cs b/src/ReactiveUI.Winforms/ReactiveUserControlNonGeneric.cs index 18bcf2e269..bb846235ce 100644 --- a/src/ReactiveUI.Winforms/ReactiveUserControlNonGeneric.cs +++ b/src/ReactiveUI.Winforms/ReactiveUserControlNonGeneric.cs @@ -3,8 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Windows.Forms; - namespace ReactiveUI.Winforms; /// diff --git a/src/ReactiveUI.Winforms/Registrations.cs b/src/ReactiveUI.Winforms/Registrations.cs index 85e3e4cdae..f000b1b14d 100644 --- a/src/ReactiveUI.Winforms/Registrations.cs +++ b/src/ReactiveUI.Winforms/Registrations.cs @@ -3,8 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Windows.Forms; - namespace ReactiveUI.Winforms; /// diff --git a/src/ReactiveUI.Winforms/RoutedViewHost.cs b/src/ReactiveUI.Winforms/RoutedViewHost.cs index 06f40bf3c7..ceb07eb2dc 100644 --- a/src/ReactiveUI.Winforms/RoutedViewHost.cs +++ b/src/ReactiveUI.Winforms/RoutedViewHost.cs @@ -3,8 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Windows.Forms; - namespace ReactiveUI.Winforms; /// diff --git a/src/ReactiveUI.Winforms/TableContentSetMethodBindingConverter.cs b/src/ReactiveUI.Winforms/TableContentSetMethodBindingConverter.cs index 8f476ed9a1..f229e7ffda 100644 --- a/src/ReactiveUI.Winforms/TableContentSetMethodBindingConverter.cs +++ b/src/ReactiveUI.Winforms/TableContentSetMethodBindingConverter.cs @@ -3,8 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Windows.Forms; - namespace ReactiveUI.Winforms; /// diff --git a/src/ReactiveUI.Winforms/ViewModelViewHost.cs b/src/ReactiveUI.Winforms/ViewModelViewHost.cs index 62be0f53a5..9b9917fef5 100644 --- a/src/ReactiveUI.Winforms/ViewModelViewHost.cs +++ b/src/ReactiveUI.Winforms/ViewModelViewHost.cs @@ -3,8 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Windows.Forms; - namespace ReactiveUI.Winforms; ///