chore: use "is" operator

This commit is contained in:
Liam Sho
2023-03-28 21:02:08 +08:00
parent 9b061a749e
commit ff013fa75a

View File

@@ -72,7 +72,7 @@ namespace MaaWpfGui.Helper
// In Stylet, CreateWindow().WindowStartupLocation is CenterScreen or CenterOwner (if w.WSLoc == Manual && w.Left == NaN && w.Top == NaN && ...)
window.WindowStartupLocation = WindowStartupLocation.Manual;
if (window.GetType() == typeof(RootView))
if (window is RootView)
{
MoveWindowToDisplay(ScreenName, window);
}