private static void OnInternalWindowStateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MainWindow instance = (MainWindow)d;

            instance.SetInternalWindowState((WindowState)e.NewValue);
        }