Wpf 将控件列表绑定到画布
是否可以将标签或和FrameworkElement的OvservableCollection绑定到画布?Wpf 将控件列表绑定到画布,wpf,binding,canvas,Wpf,Binding,Canvas,是否可以将标签或和FrameworkElement的OvservableCollection绑定到画布? 如果是,该如何实现?您可以使用ItemsControl并将其ItemsPanel属性设置为画布: <ItemsControl ItemsSource={Binding Items}> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Canvas/> </Ite
如果是,该如何实现?您可以使用ItemsControl并将其ItemsPanel属性设置为画布:
<ItemsControl ItemsSource={Binding Items}>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Canvas/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
希望这有帮助你说的“绑定”是什么意思?您希望这些项目是子项吗?或者你想让他们“共享”一些财产?还是别的什么?