开发者

How to implement an ItemsControl3D which can use templates of Visual3D?

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 开发者_如何学Pythonable 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.


There's an implementation of ItemsControl3D made by DKT @ Pelebyte blog. I haven't tryed it. But I sure will.

Regards

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜