Skip to content

Commit

Permalink
chore(sample): hide debug panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 committed Jul 13, 2023
1 parent f757d4d commit f2cc105
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ private void OnNavigationItemInvoked(MUXC.NavigationView sender, MUXC.Navigation
{
ShellNavigateTo(sample, trySynchronizeCurrentItem: false);
}
else if (e.IsSettingsInvoked)
{
_shell.ActivateDebugPanel();
}
}

private void AddNavigationItems(MUXC.NavigationView nv)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
utu:SafeArea.Insets="VisibleBounds"
x:Name="NavigationViewControl"
OpenPaneLength="260"
IsSettingsVisible="False"
IsSettingsVisible="True"
IsPaneOpen="True"
IsPaneVisible="True"
IsPaneToggleButtonVisible="False"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,17 @@ public Shell()

private void OnLoaded(object sender, RoutedEventArgs e)
{
#if DEBUG
this.FindName("DebugPanel"); // materialized x:Load=false element
#if DEBUG && false
ActivateDebugPanel();
#endif
SetDarkLightToggleInitialState();
}

internal void ActivateDebugPanel()
{
this.FindName("DebugPanel"); // materialize x:Load=false element
}

private void SetDarkLightToggleInitialState()
{
#if !IS_WINUI
Expand Down

0 comments on commit f2cc105

Please sign in to comment.