Although the video and3-DBeyond the scope of this book, it is worthwhile to obtain support for these features.
VideoMediaelementType. This element can be addedUIAny place in the tree. Simply set itsSourceAttribute to associate it with the video stream to be played, as shown in the example7-49.
Example7-49
< Mediaelement Source = "C: \ windows \ system32 \ oobe \ images \ intro. wmv" Stretch = "Fill" />
3-DContent passedViewport3dYes. UntilWPFThe appearance system is associated,Viewport3dIt is just a regular control, and it can be set to size and positioning, just like other controls. However, you provide such controls3-DModel, light, camera location information. It generates this model. This control acts as3-DThe form on the screen, as shown in the example7-50.
Example7-50
< Viewport3d Cliptobounds = "True" >
< Viewport3d. Camera >
< Perspectivecamera Nearplanedistance = "1" Farplanedistance = "100"
Lookatpoint = "0, 0" Position = "30,-2, 20" Up = "0, 0, 1"
Fieldofview = "45" />
</ Viewport3d. Camera >
< Viewport3d. Models >
< Model3dgroup >
< Directionallight Color = "# Ffffffff" Direction = "10, 25,-1" />
< Ambientlight Color = "#66666666" />
< Geometrymodel3d >
< Geometrymodel3d. Geometry >
< Meshgeometry3d
Triangleindices = "0 1 2 1 2 3 2 3 0 0 1 3"
Normals = "-1,-1,-, 0, 0, 0, 0, 1"
Positions = "-2,-2,-2 2,-2,-2 0,-2 0, 1" />
</ Geometrymodel3d. Geometry >
< Geometrymodel3d. Material >
< Materialgroup >
< Diffusematerial Brush = "Lightgreen" />
< Specularmaterial Brush = "White" />
</ Materialgroup >
</ Geometrymodel3d. Material >
</ Geometrymodel3d >
</ Model3dgroup >
</ Viewport3d. Models >
</ Viewport3d >
This creates a very simple 3-DThe model contains a separate square-based taper. Figure7-58The result is displayed. This model also contains some light sources to ensure that the model is visible. ThisViewportThere is also a detailed camera location.
Figure7-58
In fact, you can use any type3-DDesign the tool model, so you cannot typically want to work with the model tag, as shown in the example7-50.Viewport3dOnly one convenient method is provided to integrate the results into your visualization tree.