Reputation: 23
I have been building a small WPF application that includes a media player. I am almost finished except for one part, Making the player full screen. I have gotten to the point to where I have the Windows Taskbar hidden, and the player is covering everything, except where the taskbar was. So the player is full screen except for where the taskbar would normally be, you just see a part of the desktop background.
private void Full_Click(object sender, RoutedEventArgs e)
{
this.WindowStyle = WindowStyle.None;
this.ResizeMode = ResizeMode.NoResize;
this.WindowState = WindowState.Maximized;
Taskbar.Hide();
player.Stretch = Stretch.Fill;
controlPanel.Visibility = Visibility.Collapsed;//hides media controls
player.Height = System.Windows.SystemParameters.PrimaryScreenHeight + 200;//I tried to set the height to fill the entire screen
Full.Visibility = Visibility.Hidden;//hides full screen control //Im aware that may be too large of an increase but I
CloseFull.Visibility = Visibility.Visible;//shows exit control //wanted to see if it would work at all
}
Upvotes: 2
Views: 1375
Reputation: 2875
Why do you want to hide the taskbar ?
This should be enough:
WindowStyle = WindowStyle.None;
ResizeMode = ResizeMode.NoResize;
WindowState = WindowState.Maximized;
Topmost = true;
Upvotes: 4