Skip to content

Commit

Permalink
Hide menu bar in fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
jloehr committed Feb 7, 2016
1 parent c14548a commit 00c1cf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Wiimote Buzzer/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
mc:Ignorable="d"
Title="Wiimote Buzzer" StateChanged="Window_StateChanged" KeyDown="Window_KeyDown">
<Grid>
<DockPanel>
<DockPanel x:Name="Menu">
<Menu DockPanel.Dock="Top" DataContext="{Binding Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
<MenuItem Header="_Settings">
<MenuItem Header="_Timed Buzzer Reset" IsChecked="{Binding TimedBuzzerReset}" Click="TimedBuzzerResetClick" />
Expand Down
2 changes: 2 additions & 0 deletions Wiimote Buzzer/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,12 @@ private void Window_StateChanged(object sender, EventArgs e)
{
case WindowState.Maximized:
WindowStyle = WindowStyle.None;
Menu.Visibility = Visibility.Hidden;

break;
case WindowState.Normal:
WindowStyle = WindowStyle.SingleBorderWindow;
Menu.Visibility = Visibility.Visible;
break;
}

Expand Down

0 comments on commit 00c1cf8

Please sign in to comment.