<Window x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid Name="myGrid">
        <Viewport3D Panel.ZIndex="0">
            <Viewport3D.Camera>
                <PerspectiveCamera Position="3,3,4" LookDirection="-1,-1,-1" FieldOfView="60"/>
            </Viewport3D.Camera>
            <Viewport3D.Children>
                <ModelVisual3D>
                    <ModelVisual3D.Content>
                        <DirectionalLight Direction="-0.3,-0.4,-0.5" />
                    </ModelVisual3D.Content>
                </ModelVisual3D>
                <ModelVisual3D x:Name="Container">
                    <Viewport2DVisual3D >
                        <Viewport2DVisual3D.Transform>
                            <Transform3DGroup>
                                <TranslateTransform3D OffsetX="1.5" />
                                <RotateTransform3D>
                                    <RotateTransform3D.Rotation>
                                        <AxisAngleRotation3D x:Name="rotationY" Axis="0,1,0" Angle="0" />
                                    </RotateTransform3D.Rotation>
                                </RotateTransform3D>
                            </Transform3DGroup>
                        </Viewport2DVisual3D.Transform>
                        <Viewport2DVisual3D.Geometry>
                            <MeshGeometry3D Positions="1,1,-1 1,-1,-1 -1,-1,-1 -1,1,-1 1,1,1 -1,1,1 -1,-1,1 1,-1,1 1,1,-1 1,1,1 1,-1,1 1,-1,-1 1,-1,-1 1,-1,1 -1,-1,1 -1,-1,-1 -1,-1,-1 -1,-1,1 -1,1,1 -1,1,-1 1,1,1 1,1,-1 -1,1,-1 -1,1,1"
                TriangleIndices="0 1 2 0 2 3 4 5 6 4 6 7 8 9 10 8 10 11 12 13 14 12 14 15 16 17 18 16 18 19 20 21 22 20 22 23"
                TextureCoordinates="0,1 0,0 1,0 1,1 1,1 -0,1 0,-0 1,0 1,1 -0,1 0,-0 1,0 1,0 1,1 -0,1 0,-0 -0,0 1,-0 1,1 0,1 1,-0 1,1 0,1 -0,0"/>
                        </Viewport2DVisual3D.Geometry>
                        <Viewport2DVisual3D.Material>
                            <DiffuseMaterial Viewport2DVisual3D.IsVisualHostMaterial="True"/>
                        </Viewport2DVisual3D.Material>
                        <Button Name="TestButton">
                            <Button.RenderTransform>
                                <ScaleTransform ScaleY="-1" />
                            </Button.RenderTransform>
                            Hello, 3D
                        </Button>
                    </Viewport2DVisual3D>
                </ModelVisual3D>
                <ModelUIElement3D>
                    <ModelUIElement3D.Transform>
                        <Transform3DGroup>
                            <ScaleTransform3D ScaleX="0.2" ScaleY="0.2" ScaleZ="0.2" />
                            <TranslateTransform3D x:Name="cube_translation" />
                        </Transform3DGroup>
                    </ModelUIElement3D.Transform>
                    <ModelUIElement3D.Model>
                        <GeometryModel3D>
                            <GeometryModel3D.Material>
                                <DiffuseMaterial>
                                    <DiffuseMaterial.Brush>
                                        <SolidColorBrush Color="Purple" />
                                    </DiffuseMaterial.Brush>
                                </DiffuseMaterial>
                            </GeometryModel3D.Material>
                            <GeometryModel3D.Geometry>
                                <MeshGeometry3D
                Positions="1,1,-1 1,-1,-1 -1,-1,-1 -1,1,-1 1,1,1 -1,1,1 -1,-1,1 1,-1,1 1,1,-1 1,1,1 1,-1,1 1,-1,-1 1,-1,-1 1,-1,1 -1,-1,1 -1,-1,-1 -1,-1,-1 -1,-1,1 -1,1,1 -1,1,-1 1,1,1 1,1,-1 -1,1,-1 -1,1,1"
                TriangleIndices="0 1 2 0 2 3 4 5 6 4 6 7 8 9 10 8 10 11 12 13 14 12 14 15 16 17 18 16 18 19 20 21 22 20 22 23"
                TextureCoordinates="0,1 0,0 1,0 1,1 1,1 -0,1 0,-0 1,0 1,1 -0,1 0,-0 1,0 1,0 1,1 -0,1 0,-0 -0,0 1,-0 1,1 0,1 1,-0 1,1 0,1 -0,0"/>
                            </GeometryModel3D.Geometry>
                        </GeometryModel3D>
                    </ModelUIElement3D.Model>
                </ModelUIElement3D>
            </Viewport3D.Children>
        </Viewport3D>
    </Grid>
    <Window.Triggers>
        <EventTrigger RoutedEvent="Window.Loaded" >
            <BeginStoryboard>
                <Storyboard Name="myStoryBoardY">
                    <DoubleAnimation
        Storyboard.TargetName="rotationY" 
        Storyboard.TargetProperty="Angle" 
        From="0" To="360" Duration="0:0:12" RepeatBehavior="Forever"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </Window.Triggers>
</Window>