How to implement an ItemsControl3D which can use templates of Visual3D?
Posted
by Christo
on Stack Overflow
See other posts from Stack Overflow
or by Christo
Published on 2010-02-09T07:15:29Z
Indexed on
2010/05/04
13:48 UTC
Read the original article
Hit count: 259
I'm looking for something like a ContainerUIElement3D which supports the ItemsSource property and an ItemTemplate property which I can use within a Viewport3D. My aim is to be able to write something like:
<ItemsControl3D ItemsSource="{Binding Path=MyItems}">
<ItemsControl3D.ItemTemplate>
<DataTemplate3D>
<!-- My template which defines the binding to each item. -->
<DataTemplate3D>
</ItemsControl3D.ItemTemplate>
</ItemsControl3D>
I'm looking for tips on how to implement this. The first tricky part is to create a DataTemplate3D which can construct the Visual3D needed to add to the ItemsControl3D.
I've been using .NET reflector to browse through the implementation of ItemsControl and DataTemplate, but I soon realised that I don't have a deep enough understanding and enough time to come up with a solution on my own.
© Stack Overflow or respective owner