windows phone app8.1 如何将普通按钮菜单项设置为AppBarButton?
how to set normal button menu items into AppBarButton in windows phone app8.1?
您好,下面是我的示例按钮代码。
<Button VerticalAlignment="Bottom" HorizontalAlignment="Right" Height="97" BorderThickness="0" Margin="331,0,-40,-62" >
<StackPanel>
<Image Source="Images/ic_navigation_drawer.png" Stretch="Fill" Width="59" Height="39" />
</StackPanel>
<Button.Flyout>
<MenuFlyout>
<MenuFlyoutItem x:Name="reloadcash" Text="Reloadcash" Click="reloadcash_Click" />
<MenuFlyoutItem x:Name="prevoiusorders" Text="Previous orders" Click="prevoiusorders_Click"/>
<MenuFlyoutItem x:Name="profile" Text="profile" Click="profile_Click"/>
<MenuFlyoutItem x:Name="changepassword" Text="changepassword" Click="changepassword_Click"/>
<MenuFlyoutItem x:Name="Contacts" Text="Contacts" Click="Contacts_Click"/>
<MenuFlyoutItem x:Name="busorderhistory" Text="Busorderhistory" Click="busorderhistory_Click"></MenuFlyoutItem>
</MenuFlyout>
</Button.Flyout>
</Button>
现在我想将上面的 menuflyout 项设置到 AppBarButton 中。
每当我单击 AppBar 按钮时,都会显示所有菜单项。
如何在 AppBarbutton 中显示所有菜单项。
如何
与在 AppBarButton 内添加 AppBarButton 和弹出按钮一样。
<AppBarButton Icon="OpenPane" Label="menu">
<AppBarButton.Flyout>
<MenuFlyout>
<MenuFlyoutItem x:Name="reloadcash" Text="Reloadcash" Click="reloadcash_Click" />
<MenuFlyoutItem x:Name="prevoiusorders" Text="Previous orders" Click="prevoiusorders_Click"/>
<MenuFlyoutItem x:Name="profile" Text="profile" Click="profile_Click"/>
<MenuFlyoutItem x:Name="changepassword" Text="changepassword" Click="changepassword_Click"/>
<MenuFlyoutItem x:Name="Contacts" Text="Contacts" Click="Contacts_Click"/>
<MenuFlyoutItem x:Name="busorderhistory" Text="Busorderhistory" Click="busorderhistory_Click"/>
</MenuFlyout>
</AppBarButton.Flyout>
</AppBarButton>
这很好用。
您好,下面是我的示例按钮代码。
<Button VerticalAlignment="Bottom" HorizontalAlignment="Right" Height="97" BorderThickness="0" Margin="331,0,-40,-62" >
<StackPanel>
<Image Source="Images/ic_navigation_drawer.png" Stretch="Fill" Width="59" Height="39" />
</StackPanel>
<Button.Flyout>
<MenuFlyout>
<MenuFlyoutItem x:Name="reloadcash" Text="Reloadcash" Click="reloadcash_Click" />
<MenuFlyoutItem x:Name="prevoiusorders" Text="Previous orders" Click="prevoiusorders_Click"/>
<MenuFlyoutItem x:Name="profile" Text="profile" Click="profile_Click"/>
<MenuFlyoutItem x:Name="changepassword" Text="changepassword" Click="changepassword_Click"/>
<MenuFlyoutItem x:Name="Contacts" Text="Contacts" Click="Contacts_Click"/>
<MenuFlyoutItem x:Name="busorderhistory" Text="Busorderhistory" Click="busorderhistory_Click"></MenuFlyoutItem>
</MenuFlyout>
</Button.Flyout>
</Button>
现在我想将上面的 menuflyout 项设置到 AppBarButton 中。
每当我单击 AppBar 按钮时,都会显示所有菜单项。 如何在 AppBarbutton 中显示所有菜单项。 如何
与在 AppBarButton 内添加 AppBarButton 和弹出按钮一样。
<AppBarButton Icon="OpenPane" Label="menu">
<AppBarButton.Flyout>
<MenuFlyout>
<MenuFlyoutItem x:Name="reloadcash" Text="Reloadcash" Click="reloadcash_Click" />
<MenuFlyoutItem x:Name="prevoiusorders" Text="Previous orders" Click="prevoiusorders_Click"/>
<MenuFlyoutItem x:Name="profile" Text="profile" Click="profile_Click"/>
<MenuFlyoutItem x:Name="changepassword" Text="changepassword" Click="changepassword_Click"/>
<MenuFlyoutItem x:Name="Contacts" Text="Contacts" Click="Contacts_Click"/>
<MenuFlyoutItem x:Name="busorderhistory" Text="Busorderhistory" Click="busorderhistory_Click"/>
</MenuFlyout>
</AppBarButton.Flyout>
</AppBarButton>
这很好用。