开发者

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

开发者 https://www.devze.com 2022-12-19 09:30 出处:网络
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

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

精彩评论

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

关注公众号