我有 AItems 和 BItems,想要绑定到 PanoramaItem 中的 AListBox 和另一个 PanoramamItem 中的 BListBox。
我在每个 ListBox 中指定了 ItemsSource
<controls:PanoramaItem>
<ListBox ItemsSource="{Binding AItems}" >
...
</ListBox>
</controls:PanoramaItem>
<controls:PanoramaItem
<ListBox ItemsSource="{Binding BItems}" >
...
</ListBox>
</controls:PanoramaItem>
如何将数据从后面的代码绑定到每个 ListBox?
我有构造函数方法
public MainPage()
{
InitializeComponent();
}
和页面加载方法
private void MainPage_Loaded(object sender, RoutedEventArgs e)
{
}
谢谢你。