私は、メディアプレーヤーを含む小さなWPFアプリケーションを構築しています。私は1つの部分を除いてほぼ完成し、プレーヤーを全画面にします。私は、Windowsのタスクバーを隠しているところまで行きました。プレーヤーは、タスクバーの場所を除いてすべてをカバーしています。プレーヤは通常、タスクバーがどこにあるのかを除いてフルスクリーンですが、デスクトップの背景の一部が表示されます。WPFアプリケーションをフルスクリーンにする方法
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
}
あなたは、その後のmaxHeightと高さを設定しようとしましたか? – WPFUser
こんにちは、Nawedさんの答えが問題を解決したら、別の解決策が見つかったとしても、「受け入れ済み」とマークしてください。同じ解決策を望む他の人を助けるために、自分の質問に対する回答として代替ソリューションを投稿することもできます。 –