This documentation is archived and is not being maintained.

ModelUIElement3D.Model Property

Gets or sets the Model3D to render.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public Model3D Model { get; set; }
  <Model3D .../>

Property Value

Type: System.Windows.Media.Media3D.Model3D
The Model3D to render.

Identifier field


Metadata properties set to true


Model is introduced in the .NET Framework version 3.5. For more information, see .NET Framework Versions and Dependencies.

The following example shows how to create two cubes using the ModelUIElement3D class:

        <PerspectiveCamera Position="8,3,0" LookDirection="-8,-3,0" />

    <!-- The container has the two cubes as its children -->
    <ContainerUIElement3D MouseDown="ContainerMouseDown">
                    <AxisAngleRotation3D x:Name="containerRotation" Axis="0, 1, 0" Angle="0" />

        <!-- Cube 1 -->
        <ModelUIElement3D MouseDown="Cube1MouseDown">
                <TranslateTransform3D OffsetZ="1.5" />

                <GeometryModel3D Geometry="{StaticResource CubeMesh}">
                        <DiffuseMaterial x:Name="cube1Material" Brush="Blue" />

        <!-- Cube 2 -->
        <ModelUIElement3D MouseDown="Cube2MouseDown">
                <TranslateTransform3D OffsetZ="-1.5" />

                <GeometryModel3D Geometry="{StaticResource CubeMesh}">
                        <DiffuseMaterial x:Name="cube2Material" Brush="Green" />

    <!-- Lights -->
            <PointLight Color="White" Position="3, 10, 4" />

The cubes respond to the mouse down event through the following event handlers:

For the complete sample, see Handling Events in 3-D Sample .

.NET Framework

Supported in: 4, 3.5 SP1, 3.0 SP1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.