Click or drag to resize
AB4D logo

WpfUIElement3DNode Class

WpfUIElement3DNode represents a WPF's UIElement2D as a SceneNode and can render its Model3D with DXEngine.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXSharedDXResource
      Ab3d.DirectXSharedDXSceneResource
        Ab3d.DirectXSceneNode
          Ab3d.DirectXObjectNode
            Ab3d.DirectX.ModelsBaseWpfObjectNode
              Ab3d.DirectX.ModelsWpfUIElement3DNode

Namespace: Ab3d.DirectX.Models
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.1.9105.2048
Syntax
C#
public class WpfUIElement3DNode : BaseWpfObjectNode

The WpfUIElement3DNode type exposes the following members.

Constructors
 NameDescription
Public methodWpfUIElement3DNode(UIElement3D) Initializes a new instance of the WpfUIElement3DNode class.
Public methodWpfUIElement3DNode(UIElement3D, DictionaryObject, String, String, Effect) Initializes a new instance of the WpfUIElement3DNode class.
Public methodWpfUIElement3DNode(UIElement3D, DictionaryString, Object, String, Effect) Initializes a new instance of the WpfUIElement3DNode class.
Top
Properties
 NameDescription
Public propertyMaterialEffect Gets or sets the Effect that will render this WpfGeometryModel3DNode. If null, a standard effect will be used (effect set in EffectsManager as standard effect)
Public propertyUIElement3D Gets the WPF's UIElement3D that is used to initialize this WpfUIElement3DNode
Top
Methods
 NameDescription
Public methodCollectRenderableObjects The task of the CollectRenderableObjects method is to create objects derived from RenderablePrimitiveBase and add them to the appropriate RenderingQueue. This method is called at the beginning of RenderScene method call but only when the scene was significantly changed (number of SceneNodes is changed, material is significantly changed, etc.)
(Overrides ObjectNodeCollectRenderableObjects)
Public methodRefresh Refresh regenerates the SceneNodes that are created from UIElement3D.
Public methodUpdate Update method is called on each update phase (before render phase)
(Overrides SceneNodeUpdate)
Top
Extension Methods
 NameDescription
Public Extension MethodGetGeometryModel3D Returns a WPF's GeometryModel3D that was used to create the specified sceneNode. If the sceneNode does not define a GeometryModel3D object, then null is returned.
(Defined by Extensions)
Public Extension MethodGetModel3D Returns a WPF's Model3D that was used to create the specified sceneNode. If the sceneNode does not define a Model3D object, then null is returned.
(Defined by Extensions)
Public Extension MethodGetModelVisual3D Returns a WPF's ModelVisual3D that was used to create the specified sceneNode or any parent SceneNode (in case searchParentSceneNodes is true). If a SceneNode that defines a ModelVisual3D is not found, then null is returned.
(Defined by Extensions)
Public Extension MethodGetVisual3D Returns a WPF's Visual3D that was used to create the specified sceneNode or any parent SceneNode (in case searchParentSceneNodes is true). If a SceneNode that defines a Visual3D is not found, then null is returned.
(Defined by Extensions)
Top
Remarks

WpfUIElement3DNode represents a WPF's UIElement2D as a SceneNode and can render its Model3D with DXEngine.

IMPORTANT:
WpfUIElement3DNode can only show 3D models but does not support the input events on the UIElement3D (MouseEnter, MouseMove, etc.). Those events cannot be supported because Viewport3D control is not visible and does not provide the events to the UIElement3D.

Instead of using events on UIElement3D, you can use EventManager3D from Ab3d.PowerToys library. The events in EventManager3D are fully supported in Ab3d.DXEngine. If this is not an option, then you will need to use WPF 3D rendering instead of DirectX rendering.

See Also