0
我有一個使用以下XAML的Xamarin.Forms應用程序。顯示用戶在Xamarin表單上按下按鈕時的按鈕列表
<StackLayout Grid.RowSpan="8"
Grid.Column="0"
>
<Label Text="{Binding ActiveMenu.ChildMenuItems.Count}" />
<ListView x:Name="weapponType"
ItemsSource="{Binding ActiveMenu.ChildMenuItems}"
BackgroundColor="Blue"
>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell >
<Button Text="{Binding Text}"
FontSize="14"
/>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
它顯示按鈕的列表如下
---- EVENT
-----PROG
-----STAT
-----MENU1
-----MENU2
當用戶點擊EVENT
我希望它顯示按鈕
---Button1
---Button2
---Button3
一個列表,其中
<Button x:Name="MenuBtn1" Text="Btn1" Command="{Binding Command1}"
<Button x:Name="MenuBtn2" Text="Btn2" Command="{Binding Command2}"
<Button x:Name="MenuBtn3" Text="Btn3" Command="{Binding Command3}"
這將是重新如果有人能夠指導我如何實現這一目標,那麼盟友就很好。
您可能(可能)想要創建第二頁,並且當用戶單擊第一頁上的按鈕時,導航到第二頁。 – Jason
@我該怎麼做? – liv2hak
https://developer.xamarin.com/guides/xamarin-forms/user-interface/navigation/hierarchical/ – Jason