Skip to content

A Swiss Army knife for developers.

Fixed a bug where Monaco Editor isn't clickable when NavigationView is in Compact state. (#56)

Etienne Baudoux494ea5f3af7a
diff --git a/src/dev/impl/DevToys/Views/MainPage.xaml.cs b/src/dev/impl/DevToys/Views/MainPage.xaml.cs
index d31028004..3ebe47d0f 100644
--- a/src/dev/impl/DevToys/Views/MainPage.xaml.cs
+++ b/src/dev/impl/DevToys/Views/MainPage.xaml.cs
@@ -69,6 +69,10 @@ namespace DevToys.Views
NotificationControl.NotificationService = _mefProvider!.Import<INotificationService>();
+ // Bug #54: Force to go to Expanded visual state on start fix an issue where starting the app
+ // with a size that made the app going to Compact state break the layout and Monaco Editor.
+ VisualStateManager.GoToState(this, NavigationViewExpandedStateName, useTransitions: true);
+
UpdateVisualState();
}