Wpf 如何绑定到ItemsControl中的项?
我写了一些控件,其中包含itemsControl。 控件中的每个项都是我编写的某个UserControl 我想在项目源和我持有的某个集合之间进行绑定: Itemscontrol:Wpf 如何绑定到ItemsControl中的项?,wpf,silverlight,Wpf,Silverlight,我写了一些控件,其中包含itemsControl。 控件中的每个项都是我编写的某个UserControl 我想在项目源和我持有的某个集合之间进行绑定: Itemscontrol: <ItemsControl x:Name="itemsControl" Background="White" > <ItemsControl.Template> <ControlTemplate> &l
<ItemsControl x:Name="itemsControl" Background="White" >
<ItemsControl.Template>
<ControlTemplate>
<ScrollViewer x:Name="ScrollViewer" Padding="{TemplateBinding Padding}" >
<ItemsPresenter />
</ScrollViewer>
</ControlTemplate>
</ItemsControl.Template>
</ItemsControl>
我要绑定的集合是一些列表,其中包含将用于创建某些“usercontrol”的对象,这些“usercontrol”将添加到itemsControl
我怎么做?(我尝试绑定到ItemSource,但我不知道如何正确地绑定)只要看看think链接就可以了