我现在有这个:
<ListBox ItemsSource="{Binding Items}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
但我需要这样的东西
不幸的是,当我以编程方式添加按钮时
ListBox.Items.Add(button);
它抛出一个错误 -
使用 ItemsSource 时操作无效
哆啦的时光机
小唯快跑啊
相关分类