diff --git a/SafeExamBrowser.UserInterface.Desktop/BrowserWindow.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/BrowserWindow.xaml.cs
index 210f12f0..27ad8055 100644
--- a/SafeExamBrowser.UserInterface.Desktop/BrowserWindow.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/BrowserWindow.xaml.cs
@@ -163,7 +163,7 @@ namespace SafeExamBrowser.UserInterface.Desktop
if (isMainWindow)
{
- WindowUtility.DisableCloseButtonFor(this);
+ this.DisableCloseButton();
}
}
diff --git a/SafeExamBrowser.UserInterface.Mobile/BrowserWindow.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/BrowserWindow.xaml.cs
index 90c3220c..f0ac98b9 100644
--- a/SafeExamBrowser.UserInterface.Mobile/BrowserWindow.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/BrowserWindow.xaml.cs
@@ -163,7 +163,7 @@ namespace SafeExamBrowser.UserInterface.Mobile
if (isMainWindow)
{
- WindowUtility.DisableCloseButtonFor(this);
+ this.DisableCloseButton();
}
}
diff --git a/SafeExamBrowser.UserInterface.Shared/SafeExamBrowser.UserInterface.Shared.csproj b/SafeExamBrowser.UserInterface.Shared/SafeExamBrowser.UserInterface.Shared.csproj
index 4f3471b5..c76d587a 100644
--- a/SafeExamBrowser.UserInterface.Shared/SafeExamBrowser.UserInterface.Shared.csproj
+++ b/SafeExamBrowser.UserInterface.Shared/SafeExamBrowser.UserInterface.Shared.csproj
@@ -75,7 +75,7 @@
-
+
diff --git a/SafeExamBrowser.UserInterface.Shared/Utilities/WindowUtility.cs b/SafeExamBrowser.UserInterface.Shared/Utilities/WindowExtensions.cs
similarity index 82%
rename from SafeExamBrowser.UserInterface.Shared/Utilities/WindowUtility.cs
rename to SafeExamBrowser.UserInterface.Shared/Utilities/WindowExtensions.cs
index 69fb622c..318f3ec7 100644
--- a/SafeExamBrowser.UserInterface.Shared/Utilities/WindowUtility.cs
+++ b/SafeExamBrowser.UserInterface.Shared/Utilities/WindowExtensions.cs
@@ -13,17 +13,17 @@ using System.Windows.Interop;
namespace SafeExamBrowser.UserInterface.Shared.Utilities
{
- public static class WindowUtility
+ public static class WindowExtensions
{
private const uint MF_BYCOMMAND = 0x00000000;
private const uint MF_GRAYED = 0x00000001;
private const uint MF_ENABLED = 0x00000000;
private const uint SC_CLOSE = 0xF060;
- public static void DisableCloseButtonFor(Window window)
+ public static void DisableCloseButton(this Window window)
{
- var handle = new WindowInteropHelper(window);
- var systemMenu = GetSystemMenu(handle.Handle, false);
+ var helper = new WindowInteropHelper(window);
+ var systemMenu = GetSystemMenu(helper.Handle, false);
if (systemMenu != IntPtr.Zero)
{