【发布时间】:2017-10-07 06:44:45
【问题描述】:
我在 Xamarin.Forms 应用程序中使用 MasterDetailPage。
为了创建菜单项,我使用按钮
<MasterDetailPage.Master>
<ContentPage Title="Menu">
<StackLayout Orientation="Vertical">
<Button Text="Club-House" Command="{Binding ClubHouseCommand}" />
<Button Text="Parcours" />
<BoxView VerticalOptions="CenterAndExpand" />
<Button Text="A propos" Command="{Binding AProposCommand}" VerticalOptions="End" />
</StackLayout>
</ContentPage>
</MasterDetailPage.Master>
有没有更好的方法呢?我正在考虑更多的menuish,比如 MenuItem 或其他。
谢谢
【问题讨论】:
-
使用列表视图代替按钮
-
谢谢@JayPatel。这是标准的做法吗?
-
是的,大多数开发人员都使用列表视图。参考almirvuk.blogspot.in/2016/10/…
标签: xamarin.forms menuitem master-detail