ItemsControl.Items
バインディングを介してコントロール内の個々のアイテムにコレクションを渡すことは可能ですか?
私がやりたいことは次のようになります (具体的には WorkspaceCubes バインディング): (ItemsControl
またはそのにバインドできないため、現在は機能しませんItems
)
<ItemsControl x:Name="workspace" ItemsSource="{Binding Path=CubeViewModels}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Canvas Background="SkyBlue" Margin="0"></Canvas>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Canvas>
<Sift:CubeView WorkspaceCubes="{Binding ElementName=workspace, Path=Items}" DataContext="{Binding}"></Sift:CubeView>
</Canvas>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>