2016-05-26 16 views
3

XAML UWPで底面の高さを低くする方法はありますか?AppBar?私は、XAMLコードの下にあります。XAML UWPでボトムAppBarの高さを変更

<Page.BottomAppBar> 
    <CommandBar Height="35"> 
     <CommandBar.SecondaryCommands> 
      <AppBarButton Label="Share"/> 
      <AppBarButton Label="Settings"/> 
      <AppBarButton Label="Settings"/> 
      <AppBarButton Label="Settings"/> 
      <AppBarButton Label="Settings"/> 
      <AppBarButton Label="Settings"/> 
      <AppBarButton Label="Settings"/> 
     </CommandBar.SecondaryCommands> 
    </CommandBar> 
</Page.BottomAppBar> 

問題は、私は35または50以下の高さを設定するとき、私はちょうど下のアプリケーションバーの上に余分な空白を参照してください、です。私は背景色として黒または青を使用している場合や、その空白は白色

See the screen shot

+0

解決策はありますか? – Laire

答えて

5

これはApp.xaml.csファイル内の対応するテーマリソースを上書きすることで修正するeasist方法でレンダリングします。私は、この定義済みのリソースを見つけた方法です

<Application 
    x:Class="MyApp.App" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:local="using:MyApp" 
    RequestedTheme="Light"> 

    <Application.Resources> 
     <x:Double x:Key="AppBarThemeCompactHeight">35</x:Double> 
    </Application.Resources> 
</Application> 

は、最初に私は、私は基本的にはちょうど通過したとに関連するものを見つけ、CommandBarのデフォルトStyleをGoogleで検索しました。

関連する問題