C# で Windows 8 アプリを作成していますが、アプリ バーを画面の下部に表示できません。
2560x1440 の PC モニターと 1366x768 の Windows サーフェスでプログラムをテストしています。Windows Surface デバイスに (既定で) 完全に適合しますが、PC モニターでは画面の中央に表示されます。
ここに私が持っているものがあります:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
can.Height = user.screenHeight; //Can is a canvas, which is being drawn on to.
can.Width = user.screenWidth; //user class contains information about the current user of the program
var resScale = Windows.Graphics.Display.DisplayProperties.ResolutionScale;
}
キャンバスは画面全体をカバーするので簡単に設定できます。しかし、アプリバーへのアプローチ方法がわかりません。画面の下部にバーを自動的にタグ付けするプロパティがないことに驚いています。
アプリ バーの XAML は次のとおりです。
<AppBar x:Name="mainBar" Canvas.Top="700" Width="1366" VerticalAlignment="Bottom">
<Button Style="{StaticResource NewWindowAppBarButtonStyle}" Click="Button_Click_1" />
</AppBar>
これが尋ねられた場合は申し訳ありません。ただ私は何年もの間探し回っていて、私を助けるものを見つけることができません.
ありがとう