我正在研究Windows通用平台(UWP)的项目。在此项目中,我有一个关于底部Appbar的发布。减少底部appbar中的Appbar按钮大小在Windows通用应用程序中对于移动视图
我设计了一个底部的Appbar,并添加了一个7 Appbar Button.which在桌面和列表视图中正确显示,但在移动视图中显示不正确。我捕获了Mobile和Desktop视图的底部Appbar照片。 如此友善地为移动视图提供解决方案我如何管理所有7个appbar按钮? 如何减少appbar按钮大小?所以它将在移动视图中显示正确。
代码:
<Page.BottomAppBar>
<AppBar x:Name="applicationbar" Background="#FFE45427">
<StackPanel x:Name="bottombar" Orientation="Horizontal" HorizontalAlignment="Center">
<AppBarButton Label="HOME" x:Name="appbarhome" Click="appbarhome_Click">
<AppBarButton.Icon>
<BitmapIcon UriSource="Images/DashboardImages/product-default-small.png" />
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Label="Sales" x:Name="appbarsales" Click="appbarsales_Click">
<AppBarButton.Icon>
<BitmapIcon UriSource="Images/DashboardImages/menu_sales.png"/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Label="Product" x:Name="appbarproduct" Click="appbarproduct_Click">
<AppBarButton.Icon>
<BitmapIcon UriSource="Images/DashboardImages/menu_product.png" />
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Label="POS" x:Name="appbarpos" Click="appbarpos_Click">
<AppBarButton.Icon>
<BitmapIcon UriSource="Images/DashboardImages/menu_pos.png"/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Label="Customer" x:Name="customer" Click="customer_Click">
<AppBarButton.Icon>
<BitmapIcon UriSource="Images/DashboardImages/menu_customers.png"/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Label="About US" x:Name="aboutUs" Click="aboutUs_Click">
<AppBarButton.Icon>
<BitmapIcon UriSource="Images/DashboardImages/menu_aboutus.png"/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Label="Logout" x:Name="mobile_logout_commandbar" Click="mobile_logout_commandbar_Click">
<AppBarButton.Icon>
<BitmapIcon UriSource="Images/DashboardImages/menu_logout.png"/>
</AppBarButton.Icon>
</AppBarButton>
</StackPanel>
</AppBar>
</Page.BottomAppBar>
图片:
您应该查看大小更改,当其变窄时,将[SecondaryCommands](https://msdn.microsoft.com/library/windows/apps/dn279434)菜单中的某些项目放入。减小按钮的宽度使它们更难以点击,并且不是解决这个问题的方法。 –