Hello,
I'm wondering if anyone knows if it's possible in XAML to have a ListBox whose DataTemplate defines the ListBoxItem as a 3d element. Something along the lines of:
<ListBox x:Name="lst3D" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<ListBox.ItemTemplate>
<DataTemplate>
<Viewport3D>
<Viewport2DVisual3D>
<Viewport2DVisual3D.Transform>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3D Angle="40" Axis="0, 1, 0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
</Viewport2DVisual3D.Transform>
<Viewport2DVisual3D.Geometry>
<MeshGeometry3D Positions="-1,1,0 -1,-1,0 1,-1,0 1,1,0"
TextureCoordinates="0,0 0,1 1,1 1,0"
TriangleIndices="0 1 2 0 2 3"/>
</Viewport2DVisual3D.Geometry>
<Viewport2DVisual3D.Material>
<DiffuseMaterial Viewport2DVisual3D.IsVisualHostMaterial="True" Brush="AliceBlue"/>
</Viewport2DVisual3D.Material>
<Label>Hello, 3D</Label> // we'd like to databind controls like this one
</Viewport2DVisual3D>
</Viewport3D>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBoxItem />
<ListBoxItem />
<ListBoxItem />
</ListBox>
Anyone seen this sort of thing done/have any advice?
Greatly appreciated, bv