0
如何向一個xaml顯示一個listview? on mainpage.xaml,我只想顯示綁定「Kata」。另一個xaml我想顯示綁定「卡塔」和「說明」。將一個listview綁定到多個xaml
此MainPage.xaml中
<ListView x:Name="listView" ItemsSource="{Binding}" HorizontalAlignment="Left" Height="520" VerticalAlignment="Top" Width="340" Margin="10,10,0,0" Grid.Row="2" Background="#33FFFFFF">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Kata}" Tapped="TextBlock_Tapped_1" FontSize="26.667" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
這
另一個XAML。
<ListView x:Name="dictionary_list" ItemsSource="{Binding}" HorizontalAlignment="Left" Height="620" VerticalAlignment="Top" Width="340" Margin="10,10,0,0" Background="{ThemeResource AppBarItemDisabledForegroundThemeBrush}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Kata}" FontSize="26.667" Foreground="White" TextAlignment="Center" />
<TextBlock Text="{Binding Description}" Foreground="White" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>