Table of Contents

Class Viewport3DX

Namespace
HelixToolkit.Wpf.SharpDX
Assembly
HelixToolkit.Wpf.SharpDX.dll

Provides a Viewport control.

[TemplatePart(Name = "PART_Canvas", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_AdornerLayer", Type = typeof(AdornerDecorator))]
[TemplatePart(Name = "PART_CoordinateView", Type = typeof(Viewport3D))]
[TemplatePart(Name = "PART_ViewCube", Type = typeof(Viewport3D))]
[TemplatePart(Name = "PART_FrameStatisticView", Type = typeof(Viewport3D))]
[TemplatePart(Name = "PART_TitleView", Type = typeof(StackPanel2D))]
[TemplatePart(Name = "PART_Items", Type = typeof(ItemsControl))]
[Localizability(LocalizationCategory.NeverLocalize)]
public class Viewport3DX : Control, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IViewport3DX, IDisposable
Inheritance
Viewport3DX
Implements
Inherited Members
Extension Methods

Constructors

Viewport3DX()

Initializes a new instance of the Viewport3DX class.

public Viewport3DX()

Fields

AllowLeftRightRotationProperty

public static readonly DependencyProperty AllowLeftRightRotationProperty

Field Value

DependencyProperty

AllowUpDownRotationProperty

public static readonly DependencyProperty AllowUpDownRotationProperty

Field Value

DependencyProperty

BackgroundColorProperty

Background Color property.this.RenderHost

public static readonly DependencyProperty BackgroundColorProperty

Field Value

DependencyProperty

BelongsToParentWindowProperty

The belongs to parent window property

public static readonly DependencyProperty BelongsToParentWindowProperty

Field Value

DependencyProperty

CameraChangedEvent

The camera changed event.

public static readonly RoutedEvent CameraChangedEvent

Field Value

RoutedEvent

CameraInertiaFactorProperty

The camera inertia factor property.

public static readonly DependencyProperty CameraInertiaFactorProperty

Field Value

DependencyProperty

CameraModeProperty

The camera mode property

public static readonly DependencyProperty CameraModeProperty

Field Value

DependencyProperty

CameraProperty

The camera property

public static readonly DependencyProperty CameraProperty

Field Value

DependencyProperty

CameraRotationModeProperty

The camera rotation mode property

public static readonly DependencyProperty CameraRotationModeProperty

Field Value

DependencyProperty

ChangeFieldOfViewCursorProperty

The change fov cursor property.

public static readonly DependencyProperty ChangeFieldOfViewCursorProperty

Field Value

DependencyProperty

Content2DProperty

The content 2d property

public static readonly DependencyProperty Content2DProperty

Field Value

DependencyProperty

CoordinateSystemAxisXColorProperty

The coordinate system color X property

public static readonly DependencyProperty CoordinateSystemAxisXColorProperty

Field Value

DependencyProperty

CoordinateSystemAxisYColorProperty

The coordinate system Color Y property

public static readonly DependencyProperty CoordinateSystemAxisYColorProperty

Field Value

DependencyProperty

CoordinateSystemAxisZColorProperty

The coordinate system Color Z property

public static readonly DependencyProperty CoordinateSystemAxisZColorProperty

Field Value

DependencyProperty

CoordinateSystemHorizontalPositionProperty

The coordinate system horizontal position property. Relative to viewport center

Default: -0.8

public static readonly DependencyProperty CoordinateSystemHorizontalPositionProperty

Field Value

DependencyProperty

CoordinateSystemLabelForegroundProperty

The coordinate system label foreground property

public static readonly DependencyProperty CoordinateSystemLabelForegroundProperty

Field Value

DependencyProperty

CoordinateSystemLabelXProperty

The coordinate system label X property

public static readonly DependencyProperty CoordinateSystemLabelXProperty

Field Value

DependencyProperty

CoordinateSystemLabelYProperty

The coordinate system label Y property

public static readonly DependencyProperty CoordinateSystemLabelYProperty

Field Value

DependencyProperty

CoordinateSystemLabelZProperty

The coordinate system label Z property

public static readonly DependencyProperty CoordinateSystemLabelZProperty

Field Value

DependencyProperty

CoordinateSystemSizeProperty

The coordinate system size property.

public static readonly DependencyProperty CoordinateSystemSizeProperty

Field Value

DependencyProperty

CoordinateSystemVerticalPositionProperty

The coordinate system vertical position property. Relative to viewport center.

Default: -0.8

public static readonly DependencyProperty CoordinateSystemVerticalPositionProperty

Field Value

DependencyProperty

CursorOnElementPositionProperty

Identifies the CursorOnElementPosition dependency property.

public static readonly DependencyProperty CursorOnElementPositionProperty

Field Value

DependencyProperty

Remarks

This property returns the position of the nearest model.

CursorPositionProperty

Identifies the CursorPosition dependency property.

public static readonly DependencyProperty CursorPositionProperty

Field Value

DependencyProperty

Remarks

The return value equals ConstructionPlanePosition or CursorModelSnapPosition if CursorSnapToModels is not null.

DefaultCameraProperty

The default camera property.

public static readonly DependencyProperty DefaultCameraProperty

Field Value

DependencyProperty

DpiScaleProperty

The dpi scale

public static readonly DependencyProperty DpiScaleProperty

Field Value

DependencyProperty

EffectsManagerProperty

The EffectsManager property.

public static readonly DependencyProperty EffectsManagerProperty

Field Value

DependencyProperty

EnableAutoOctreeUpdateProperty

The enable automatic octree update property

public static readonly DependencyProperty EnableAutoOctreeUpdateProperty

Field Value

DependencyProperty

EnableCursorPositionProperty

Identifies the EnableCursorPosition dependency property. It enables (true) or disables (false) the calculation of the cursor position in the 3D Viewport

public static readonly DependencyProperty EnableCursorPositionProperty

Field Value

DependencyProperty

EnableD2DRenderingProperty

The enable d2d rendering property

public static readonly DependencyProperty EnableD2DRenderingProperty

Field Value

DependencyProperty

EnableDeferredRenderingProperty

Enable deferred rendering. Use multithreading to call rendering procedure using different Deferred Context.

Deferred Rendering: https://msdn.microsoft.com/en-us/library/windows/desktop/ff476892.aspx

https://docs.nvidia.com/gameworks/content/gameworkslibrary/graphicssamples/d3d_samples/d3d11deferredcontextssample.htm

Note: Only if draw calls > 3000 to be benefit according to the online performance test.

public static readonly DependencyProperty EnableDeferredRenderingProperty

Field Value

DependencyProperty

EnableDesignModeRenderingProperty

The enable design mode rendering property

public static readonly DependencyProperty EnableDesignModeRenderingProperty

Field Value

DependencyProperty

EnableDpiScaleProperty

The enable dpi scale property

public static readonly DependencyProperty EnableDpiScaleProperty

Field Value

DependencyProperty

EnableMouseButtonHitTestProperty

Enable mouse button hit test

public static readonly DependencyProperty EnableMouseButtonHitTestProperty

Field Value

DependencyProperty

EnableOITDepthPeelingDynamicIterationProperty

public static readonly DependencyProperty EnableOITDepthPeelingDynamicIterationProperty

Field Value

DependencyProperty

EnableRenderFrustumProperty

Enable render frustum to avoid rendering model if it is out of view frustum

public static readonly DependencyProperty EnableRenderFrustumProperty

Field Value

DependencyProperty

EnableRenderOrderProperty

The enable render order property. EnableRenderOrder

public static readonly DependencyProperty EnableRenderOrderProperty

Field Value

DependencyProperty

EnableSSAOProperty

The enable ssao property

public static readonly DependencyProperty EnableSSAOProperty

Field Value

DependencyProperty

EnableSharedModelModeProperty

Used to create multiple viewport with shared models.

public static readonly DependencyProperty EnableSharedModelModeProperty

Field Value

DependencyProperty

EnableSwapChainRenderingProperty

The enable swap chain rendering property

public static readonly DependencyProperty EnableSwapChainRenderingProperty

Field Value

DependencyProperty

FXAALevelProperty

The fxaa level property

public static readonly DependencyProperty FXAALevelProperty

Field Value

DependencyProperty

FieldOfViewTextProperty

The field of view text property.

public static readonly DependencyProperty FieldOfViewTextProperty

Field Value

DependencyProperty

FixedRotationPointEnabledProperty

Enable fixed rotation mode and use FixedRotationPoint for rotation. Only works under CameraMode = Inspect

public static readonly DependencyProperty FixedRotationPointEnabledProperty

Field Value

DependencyProperty

FixedRotationPointProperty

Rotate around this fixed rotation point only.FixedRotationPointEnabledProperty

public static readonly DependencyProperty FixedRotationPointProperty

Field Value

DependencyProperty

FrameRateProperty

The frame rate property.

public static readonly DependencyProperty FrameRateProperty

Field Value

DependencyProperty

FrameRateTextProperty

The frame rate text property.

public static readonly DependencyProperty FrameRateTextProperty

Field Value

DependencyProperty

IncreaseSwapchainFPSProperty

public static readonly DependencyProperty IncreaseSwapchainFPSProperty

Field Value

DependencyProperty

InfiniteSpinProperty

The infinite spin property.

public static readonly DependencyProperty InfiniteSpinProperty

Field Value

DependencyProperty

InfoBackgroundProperty

The info background property.

public static readonly DependencyProperty InfoBackgroundProperty

Field Value

DependencyProperty

InfoForegroundProperty

The info foreground property.

public static readonly DependencyProperty InfoForegroundProperty

Field Value

DependencyProperty

IsChangeFieldOfViewEnabledProperty

The is change field of view enabled property

public static readonly DependencyProperty IsChangeFieldOfViewEnabledProperty

Field Value

DependencyProperty

IsCoordinateSystemMoverEnabledProperty

The is coordinate system mover enabled property

public static readonly DependencyProperty IsCoordinateSystemMoverEnabledProperty

Field Value

DependencyProperty

IsInertiaEnabledProperty

Identifies the IsInertiaEnabled dependency property.

public static readonly DependencyProperty IsInertiaEnabledProperty

Field Value

DependencyProperty

IsMoveEnabledProperty

The is move enabled property.

public static readonly DependencyProperty IsMoveEnabledProperty

Field Value

DependencyProperty

IsPanEnabledProperty

The is pan enabled property

public static readonly DependencyProperty IsPanEnabledProperty

Field Value

DependencyProperty

IsPinchZoomEnabledProperty

The IsTouchZoomEnabled property.

public static readonly DependencyProperty IsPinchZoomEnabledProperty

Field Value

DependencyProperty

IsRotationEnabledProperty

The is rotation enabled property

public static readonly DependencyProperty IsRotationEnabledProperty

Field Value

DependencyProperty

IsShadowMappingEnabledProperty

The is deferred shading enabled propery

public static readonly DependencyProperty IsShadowMappingEnabledProperty

Field Value

DependencyProperty

IsThreeFingerPanningEnabledProperty

The enable touch rotate property

public static readonly DependencyProperty IsThreeFingerPanningEnabledProperty

Field Value

DependencyProperty

IsTouchRotateEnabledProperty

The enable touch rotate property

public static readonly DependencyProperty IsTouchRotateEnabledProperty

Field Value

DependencyProperty

IsViewCubeEdgeClicksEnabledProperty

Identifies the IsViewCubeEdgeClicksEnabled dependency property.

public static readonly DependencyProperty IsViewCubeEdgeClicksEnabledProperty

Field Value

DependencyProperty

IsViewCubeMoverEnabledProperty

Identifies the IsViewCubeEdgeClicksEnabled dependency property.

public static readonly DependencyProperty IsViewCubeMoverEnabledProperty

Field Value

DependencyProperty

IsZoomEnabledProperty

The is zoom enabled property

public static readonly DependencyProperty IsZoomEnabledProperty

Field Value

DependencyProperty

LeftRightPanSensitivityProperty

The left right pan sensitivity property.

public static readonly DependencyProperty LeftRightPanSensitivityProperty

Field Value

DependencyProperty

LeftRightRotationSensitivityProperty

The left right rotation sensitivity property.

public static readonly DependencyProperty LeftRightRotationSensitivityProperty

Field Value

DependencyProperty

MSAAProperty

Set MSAA Level

public static readonly DependencyProperty MSAAProperty

Field Value

DependencyProperty

ManualLookAtPointProperty

Manually move camera to look at a point in 3D space

public static readonly DependencyProperty ManualLookAtPointProperty

Field Value

DependencyProperty

MaximumFieldOfViewProperty

The maximum field of view property

public static readonly DependencyProperty MaximumFieldOfViewProperty

Field Value

DependencyProperty

MessageTextProperty

The message text property.

public static readonly DependencyProperty MessageTextProperty

Field Value

DependencyProperty

MinimumFieldOfViewProperty

The minimum field of view property

public static readonly DependencyProperty MinimumFieldOfViewProperty

Field Value

DependencyProperty

MinimumUpdateCountProperty

The minimum update count property

public static readonly DependencyProperty MinimumUpdateCountProperty

Field Value

DependencyProperty

ModelUpDirectionProperty

The model up direction property

public static readonly DependencyProperty ModelUpDirectionProperty

Field Value

DependencyProperty

MoveSensitivityProperty

Identifies the MoveSensitivity dependency property.

public static readonly DependencyProperty MoveSensitivityProperty

Field Value

DependencyProperty

OITDepthPeelingIterationProperty

public static readonly DependencyProperty OITDepthPeelingIterationProperty

Field Value

DependencyProperty

OITRenderModeProperty

Gets or sets a value indicating for Transparent objects render mode. IsTransparent, IsTransparent

public static readonly DependencyProperty OITRenderModeProperty

Field Value

DependencyProperty

OITWeightDepthSlopeProperty

The oit weight depth slope property

public static readonly DependencyProperty OITWeightDepthSlopeProperty

Field Value

DependencyProperty

OITWeightModeProperty

The oit weight mode property

Please refer to http://jcgt.org/published/0002/02/09/

Linear0: eq7; Linear1: eq8; Linear2: eq9; NonLinear: eq10

public static readonly DependencyProperty OITWeightModeProperty

Field Value

DependencyProperty

OITWeightPowerProperty

The Order independent transparency rendering color weight power property

public static readonly DependencyProperty OITWeightPowerProperty

Field Value

DependencyProperty

OrthographicProperty

The orthographic property.

public static readonly DependencyProperty OrthographicProperty

Field Value

DependencyProperty

PageUpDownZoomSensitivityProperty

Identifies the PageUpDownZoomSensitivity dependency property.

public static readonly DependencyProperty PageUpDownZoomSensitivityProperty

Field Value

DependencyProperty

PanCursorProperty

The pan cursor property

public static readonly DependencyProperty PanCursorProperty

Field Value

DependencyProperty

PinchZoomAtCenterProperty

The pinch zoom at center property

public static readonly DependencyProperty PinchZoomAtCenterProperty

Field Value

DependencyProperty

RenderDetailOutputProperty

The render detail output property

public static readonly DependencyProperty RenderDetailOutputProperty

Field Value

DependencyProperty

RenderExceptionProperty

The render exception property.

public static readonly DependencyProperty RenderExceptionProperty

Field Value

DependencyProperty

RotateAroundMouseDownPointProperty

The rotate around mouse down point property

public static readonly DependencyProperty RotateAroundMouseDownPointProperty

Field Value

DependencyProperty

RotateCursorProperty

The rotate cursor property

public static readonly DependencyProperty RotateCursorProperty

Field Value

DependencyProperty

RotationSensitivityProperty

The rotation sensitivity property

public static readonly DependencyProperty RotationSensitivityProperty

Field Value

DependencyProperty

SSAOIntensityProperty

The ssao intensity property

public static readonly DependencyProperty SSAOIntensityProperty

Field Value

DependencyProperty

SSAOQualityProperty

The ssao quality property

public static readonly DependencyProperty SSAOQualityProperty

Field Value

DependencyProperty

SSAOSamplingRadiusProperty

The ssao sampling radius property

public static readonly DependencyProperty SSAOSamplingRadiusProperty

Field Value

DependencyProperty

SharedModelContainerProperty

Binding to the element inherit with IModelContainer

public static readonly DependencyProperty SharedModelContainerProperty

Field Value

DependencyProperty

ShowCameraInfoProperty

The show camera info property.

public static readonly DependencyProperty ShowCameraInfoProperty

Field Value

DependencyProperty

ShowCameraTargetProperty

The show camera target property.

public static readonly DependencyProperty ShowCameraTargetProperty

Field Value

DependencyProperty

ShowCoordinateSystemProperty

The show coordinate system property.

public static readonly DependencyProperty ShowCoordinateSystemProperty

Field Value

DependencyProperty

ShowFrameDetailsProperty

The show frame rate property.

public static readonly DependencyProperty ShowFrameDetailsProperty

Field Value

DependencyProperty

ShowFrameRateProperty

The show frame rate property.

public static readonly DependencyProperty ShowFrameRateProperty

Field Value

DependencyProperty

ShowTriangleCountInfoProperty

The show triangle count info property.

public static readonly DependencyProperty ShowTriangleCountInfoProperty

Field Value

DependencyProperty

ShowViewCubeProperty

The show view cube property.

public static readonly DependencyProperty ShowViewCubeProperty

Field Value

DependencyProperty

SpinReleaseTimeProperty

The spin release time property

public static readonly DependencyProperty SpinReleaseTimeProperty

Field Value

DependencyProperty

SubTitleProperty

The sub title property.

public static readonly DependencyProperty SubTitleProperty

Field Value

DependencyProperty

SubTitleSizeProperty

The sub title size property.

public static readonly DependencyProperty SubTitleSizeProperty

Field Value

DependencyProperty

TextBrushProperty

The text brush property.

public static readonly DependencyProperty TextBrushProperty

Field Value

DependencyProperty

TitleBackgroundProperty

The title background property.

public static readonly DependencyProperty TitleBackgroundProperty

Field Value

DependencyProperty

TitleFontFamilyProperty

The title font family property.

public static readonly DependencyProperty TitleFontFamilyProperty

Field Value

DependencyProperty

TitleProperty

The title property.

public static readonly DependencyProperty TitleProperty

Field Value

DependencyProperty

TitleSizeProperty

The title size property.

public static readonly DependencyProperty TitleSizeProperty

Field Value

DependencyProperty

UpDownPanSensitivityProperty

The up down Pan sensitivity property.

public static readonly DependencyProperty UpDownPanSensitivityProperty

Field Value

DependencyProperty

UpDownRotationSensitivityProperty

The up down rotation sensitivity property.

public static readonly DependencyProperty UpDownRotationSensitivityProperty

Field Value

DependencyProperty

UseDefaultGesturesProperty

The use default gestures property

public static readonly DependencyProperty UseDefaultGesturesProperty

Field Value

DependencyProperty

ViewCubeHorizontalPositionProperty

The view cube horizontal position property. Relative to viewport center.

Default: 0.8

public static readonly DependencyProperty ViewCubeHorizontalPositionProperty

Field Value

DependencyProperty

ViewCubeSizeProperty

The view cube size property.

public static readonly DependencyProperty ViewCubeSizeProperty

Field Value

DependencyProperty

ViewCubeTextureProperty

The view cube texture. It must be a 6x1 (ex: 600x100) ratio image. You can also use BitmapExtension.CreateViewBoxBitmapSource to create

public static readonly DependencyProperty ViewCubeTextureProperty

Field Value

DependencyProperty

ViewCubeVerticalPositionProperty

The view cube vertical position property. Relative to viewport center.

Default: -0.8

public static readonly DependencyProperty ViewCubeVerticalPositionProperty

Field Value

DependencyProperty

ZoomAroundMouseDownPointProperty

The zoom around mouse down point property

public static readonly DependencyProperty ZoomAroundMouseDownPointProperty

Field Value

DependencyProperty

ZoomCursorProperty

The zoom cursor property

public static readonly DependencyProperty ZoomCursorProperty

Field Value

DependencyProperty

ZoomDistanceLimitFarProperty

The far zoom distance limit property.

public static readonly DependencyProperty ZoomDistanceLimitFarProperty

Field Value

DependencyProperty

ZoomDistanceLimitNearProperty

The near zoom distance limit property.

public static readonly DependencyProperty ZoomDistanceLimitNearProperty

Field Value

DependencyProperty

ZoomExtentsWhenLoadedProperty

The zoom extents when loaded property.

public static readonly DependencyProperty ZoomExtentsWhenLoadedProperty

Field Value

DependencyProperty

ZoomRectangleCursorProperty

The zoom rectangle cursor property

public static readonly DependencyProperty ZoomRectangleCursorProperty

Field Value

DependencyProperty

ZoomSensitivityProperty

The zoom sensitivity property

public static readonly DependencyProperty ZoomSensitivityProperty

Field Value

DependencyProperty

renderHostInternal

Gets or sets the render host internal.

protected IRenderHost? renderHostInternal

Field Value

IRenderHost

The render host internal.

Properties

AllowLeftRightRotation

Gets or sets a value indicating whether globally [allow left right rotation].

public bool AllowLeftRightRotation { get; set; }

Property Value

bool

true if [allow left right rotation]; otherwise, false.

AllowUpDownRotation

Gets or sets a value indicating whether globally [allow up down rotation].

public bool AllowUpDownRotation { get; set; }

Property Value

bool

true if [allow up down rotation]; otherwise, false.

BackgroundColor

Background Color

public Color BackgroundColor { get; set; }

Property Value

Color

BelongsToParentWindow

Gets or sets a value indicating if the life cycle of the viewport depends on the first parent window found in the actual visual tree.

public bool BelongsToParentWindow { get; set; }

Property Value

bool

true if the viewport belongs to the first parent window; otherwise, false

Camera

Gets or sets the camera.

public Camera? Camera { get; set; }

Property Value

Camera

The camera.

CameraCore

Gets the camera core.

public CameraCore? CameraCore { get; }

Property Value

CameraCore

The camera core.

CameraInertiaFactor

Gets or sets the camera inertia factor.

public double CameraInertiaFactor { get; set; }

Property Value

double

The camera inertia factor.

CameraMode

Gets or sets the camera mode.

public CameraMode CameraMode { get; set; }

Property Value

CameraMode

The camera mode.

CameraRotationMode

Gets or sets the camera rotation mode.

public CameraRotationMode CameraRotationMode { get; set; }

Property Value

CameraRotationMode

The camera rotation mode.

ChangeFieldOfViewCursor

Gets or sets the change field of view cursor.

public Cursor ChangeFieldOfViewCursor { get; set; }

Property Value

Cursor

The change field of view cursor.

Content2D

Gets or sets the content2d.

public Element2D? Content2D { get; set; }

Property Value

Element2D

The content2 d.

CoordinateSystemAxisXColor

Gets or sets the coordinate system color X.

public Color CoordinateSystemAxisXColor { get; set; }

Property Value

Color

The coordinate system color X.

CoordinateSystemAxisYColor

Gets or sets the coordinate system color Y.

public Color CoordinateSystemAxisYColor { get; set; }

Property Value

Color

The coordinate system color T.

CoordinateSystemAxisZColor

Gets or sets the coordinate system color Z.

public Color CoordinateSystemAxisZColor { get; set; }

Property Value

Color

The coordinate system color Z.

CoordinateSystemHorizontalPosition

Gets or sets the horizontal position of the coordinate system viewport. Relative to the viewport center.

Default: -0.8

public double CoordinateSystemHorizontalPosition { get; set; }

Property Value

double

The horizontal position.

CoordinateSystemLabelForeground

Gets or sets the color of the coordinate system label.

public Color CoordinateSystemLabelForeground { get; set; }

Property Value

Color

The color of the coordinate system label.

CoordinateSystemLabelX

Gets or sets the coordinate system label X.

public string CoordinateSystemLabelX { get; set; }

Property Value

string

The coordinate system label X.

CoordinateSystemLabelY

Gets or sets the coordinate system label Y.

public string CoordinateSystemLabelY { get; set; }

Property Value

string

The coordinate system label Y.

CoordinateSystemLabelZ

Gets or sets the coordinate system label Z.

public string CoordinateSystemLabelZ { get; set; }

Property Value

string

The coordinate system label Z.

CoordinateSystemSize

Gets or sets the width of the coordinate system viewport.

public double CoordinateSystemSize { get; set; }

Property Value

double

The width of the coordinate system viewport.

CoordinateSystemVerticalPosition

Gets or sets the vertical position of the coordinate system viewport. Relative to the viewport center

Default: -0.8

public double CoordinateSystemVerticalPosition { get; set; }

Property Value

double

The vertical position.

CursorOnElementPosition

Gets the current cursor position on the nearest model. If the model is not hit, the position is null.

public Point3D? CursorOnElementPosition { get; }

Property Value

Point3D?

The position of the model intersection.

Remarks

The EnableCursorPosition property must be set to true to enable updating of this property.

CursorPosition

Gets the current cursor position.

public Point3D? CursorPosition { get; }

Property Value

Point3D?

The current cursor position.

Remarks

The EnableCursorPosition property must be set to true to enable updating of this property.

D2DRenderables

Gets the d2d renderables.

public IEnumerable<SceneNode2D> D2DRenderables { get; }

Property Value

IEnumerable<SceneNode2D>

The d2d renderables.

DefaultCamera

Gets or sets the default camera.

public ProjectionCamera? DefaultCamera { get; set; }

Property Value

ProjectionCamera

The default camera.

DpiScale

Gets or sets the dpi scale. For example, if dpi scale is set to 200% in windows, this value must be set to 2.

public double DpiScale { get; set; }

Property Value

double

The dpi scale.

EffectsManager

Gets or sets the IEffectsManager.

public IEffectsManager? EffectsManager { get; set; }

Property Value

IEffectsManager

EnableAutoOctreeUpdate

Gets or sets a value indicating whether [enable automatic update octree for geometry models].

public bool EnableAutoOctreeUpdate { get; set; }

Property Value

bool

true if [enable automatic octree update]; otherwise, false.

EnableCursorPosition

Gets or sets a value indicating whether calculation of the CursorPosition properties is enabled.

public bool EnableCursorPosition { get; set; }

Property Value

bool

true if calculation is enabled; otherwise, false .

EnableD2DRendering

Gets or sets a value indicating whether [enable direct2D rendering]. Default is On

public bool EnableD2DRendering { get; set; }

Property Value

bool

true if [render d2d]; otherwise, false.

EnableDeferredRendering

Enable deferred rendering. Use multithreading to call rendering procedure using different Deferred Context.

Deferred Rendering: https://msdn.microsoft.com/en-us/library/windows/desktop/ff476892.aspx

https://docs.nvidia.com/gameworks/content/gameworkslibrary/graphicssamples/d3d_samples/d3d11deferredcontextssample.htm

Note: Only if draw calls > 3000 to be benefit according to the online performance test.

public bool EnableDeferredRendering { get; set; }

Property Value

bool

EnableDesignModeRendering

Gets or sets a value indicating whether [enable design mode rendering].

public bool EnableDesignModeRendering { get; set; }

Property Value

bool

true if [enable design mode rendering]; otherwise, false.

EnableDpiScale

Gets or sets a value indicating whether [enable dpi scale]. Enable this option if you want to render high definition image with using high definition monitor and using dpi scaling in windows. This option may impact rendering performance due to higher resolution.

public bool EnableDpiScale { get; set; }

Property Value

bool

true if [enable dpi scale]; otherwise, false.

EnableMouseButtonHitTest

Enable mouse button hit test

public bool EnableMouseButtonHitTest { get; set; }

Property Value

bool

EnableOITDepthPeelingDynamicIteration

public bool EnableOITDepthPeelingDynamicIteration { get; set; }

Property Value

bool

EnableRenderFrustum

Enable render frustum to skip rendering model if model is out of the camera bounding frustum

public bool EnableRenderFrustum { get; set; }

Property Value

bool

EnableRenderOrder

Gets or sets a value indicating whether [enable render order]. Specify render order in RenderOrder. Scene node will be sorted by the RenderOrder during rendering.

public bool EnableRenderOrder { get; set; }

Property Value

bool

true if [enable manual render order]; otherwise, false.

EnableSSAO

Gets or sets a value indicating whether [enable ScreenSpaced Ambient Occlusion].

public bool EnableSSAO { get; set; }

Property Value

bool

true if [enable ssao]; otherwise, false.

EnableSharedModelMode

Used to create multiple viewport with shared models.

public bool EnableSharedModelMode { get; set; }

Property Value

bool

EnableSwapChainRendering

Use HwndHost as rendering surface, swapchain for rendering. Much faster than using D3DImage.

Drawbacks: The rendering surface will cover all WPF controls in the same Viewport region. Move controls out of viewport region to solve this problem.

For displaying ViewCube and CoordinateSystem, separate Model needs to create to render along with the other models. WPF viewport will not be visibled.

Note: Enable deferred rendering will use seperate rendering thread or rendering.

public bool EnableSwapChainRendering { get; set; }

Property Value

bool

FXAALevel

Gets or sets the fxaa. If MSAA is set, FXAA will be disabled automatically

public FXAALevel FXAALevel { get; set; }

Property Value

FXAALevel

The enable fxaa.

FieldOfViewText

Gets or sets the field of view text.

public string? FieldOfViewText { get; set; }

Property Value

string

The field of view text.

FixedRotationPoint

Rotate around this fixed rotation point only.FixedRotationPointEnabled

public Point3D FixedRotationPoint { get; set; }

Property Value

Point3D

FixedRotationPointEnabled

Enable fixed rotation mode and use FixedRotationPoint for rotation. Only works under CameraMode = Inspect

public bool FixedRotationPointEnabled { get; set; }

Property Value

bool

FrameRate

Gets or sets the frame rate.

public double FrameRate { get; set; }

Property Value

double

The frame rate.

FrameRateText

Gets or sets the frame rate text.

public string? FrameRateText { get; set; }

Property Value

string

The frame rate text.

IncreaseSwapchainFPS

Increase swapchain fps by speed up the wpf composition target frame rate. This may negatively impact the performance on low end graphics card. Default is enabled.

public bool IncreaseSwapchainFPS { get; set; }

Property Value

bool

InfiniteSpin

Gets or sets a value indicating whether infinite spin is enabled.

public bool InfiniteSpin { get; set; }

Property Value

bool

true if infinite spin is enabled; otherwise, false .

InfoBackground

Gets or sets the background brush for the CameraInfo and TriangleCount fields.

public Brush InfoBackground { get; set; }

Property Value

Brush

The info background.

InfoForeground

Gets or sets the foreground brush for informational text.

public Brush InfoForeground { get; set; }

Property Value

Brush

The foreground brush.

IsChangeFieldOfViewEnabled

Gets or sets a value indicating whether change field of view is enabled.

public bool IsChangeFieldOfViewEnabled { get; set; }

Property Value

bool

true if change field of view is enabled; otherwise, false.

IsCoordinateSystemMoverEnabled

Gets or sets a value indicating whether coordinate system mover enabled.

public bool IsCoordinateSystemMoverEnabled { get; set; }

Property Value

bool

true if coordinate system mover enabled; otherwise, false.

IsInDesignMode

public static bool IsInDesignMode { get; }

Property Value

bool

IsInertiaEnabled

Gets or sets a value indicating whether inertia is enabled for the camera manipulations.

public bool IsInertiaEnabled { get; set; }

Property Value

bool

true if inertia is enabled; otherwise, false.

IsMoveEnabled

Gets or sets a value indicating whether move is enabled.

public bool IsMoveEnabled { get; set; }

Property Value

bool

true if move is enabled; otherwise, false .

IsPanEnabled

Gets or sets a value indicating whether pan is enabled.

public bool IsPanEnabled { get; set; }

Property Value

bool

true if pan is enabled; otherwise, false.

IsPinchZoomEnabled

Gets or sets a value indicating whether two finger pinch zoom is enabled.

public bool IsPinchZoomEnabled { get; set; }

Property Value

bool

true if pinch zoom is enabled; otherwise, false .

IsRotationEnabled

Gets or sets a value indicating whether rotation is enabled.

public bool IsRotationEnabled { get; set; }

Property Value

bool

true if rotation is enabled; otherwise, false.

IsShadowMappingEnabled

Gets or sets a value indicating whether shadow mapping is enabled

public bool IsShadowMappingEnabled { get; set; }

Property Value

bool

true if deferred shading is enabled; otherwise, false.

IsThreeFingerPanningEnabled

Gets or sets a value indicating whether [enable three finger panning].

public bool IsThreeFingerPanningEnabled { get; set; }

Property Value

bool

true if [enable three finger panning]; otherwise, false.

IsTouchRotateEnabled

Gets or sets a value indicating whether [enable one finger touch rotate].

public bool IsTouchRotateEnabled { get; set; }

Property Value

bool

true if [enable touch rotate]; otherwise, false.

IsViewCubeEdgeClicksEnabled

Gets or sets if the view cube edge clickable.

public bool IsViewCubeEdgeClicksEnabled { get; set; }

Property Value

bool

Boolean for enable or disable.

IsViewCubeMoverEnabled

Gets or sets a value indicating whether this instance is view cube mover enabled.

public bool IsViewCubeMoverEnabled { get; set; }

Property Value

bool

true if this instance is view cube mover enabled; otherwise, false.

IsZoomEnabled

Gets or sets a value indicating whether zoom is enabled.

public bool IsZoomEnabled { get; set; }

Property Value

bool

true if zoom is enabled; otherwise, false.

Items

Gets the items.

public ObservableElement3DCollection Items { get; }

Property Value

ObservableElement3DCollection

The items.

LeftRightPanSensitivity

Gets or sets the sensitivity for pan by the left and right keys.

public double LeftRightPanSensitivity { get; set; }

Property Value

double

The pan sensitivity.

Remarks

Use -1 to invert the pan direction.

LeftRightRotationSensitivity

Gets or sets the sensitivity for rotation by the left and right keys.

public double LeftRightRotationSensitivity { get; set; }

Property Value

double

The rotation sensitivity.

Remarks

Use -1 to invert the rotation direction.

MSAA

Set MSAA level. If set to Two/Four/Eight, the actual level is set to minimum between Maximum and Two/Four/Eight

public MSAALevel MSAA { get; set; }

Property Value

MSAALevel

ManualLookAtPoint

Manually move camera to look at a point in 3D space. (Same as calling Viewport3DX.LookAt() function) Since camera may have been moved by mouse, the value gets does not reflect the actual point camera currently looking at.

public Point3D ManualLookAtPoint { get; set; }

Property Value

Point3D

MaximumFieldOfView

Gets or sets the maximum field of view.

public double MaximumFieldOfView { get; set; }

Property Value

double

The maximum field of view.

MessageText

Gets or sets the message text.

public string? MessageText { get; set; }

Property Value

string

The message text.

MinimumFieldOfView

Gets or sets the minimum field of view.

public double MinimumFieldOfView { get; set; }

Property Value

double

The minimum field of view.

MinimumUpdateCount

The update count. Used to render at least N frames for each InvalidateRenderer. D3DImage sometimes not getting refresh if only render once. Default = 6.

public int MinimumUpdateCount { get; set; }

Property Value

int

The minimum update count.

ModelUpDirection

Gets or sets the model up direction.

public Vector3D ModelUpDirection { get; set; }

Property Value

Vector3D

The model up direction.

MouseOverModel2D

public Element2D? MouseOverModel2D { get; }

Property Value

Element2D

MoveSensitivity

Gets or sets the move sensitivity.

public double MoveSensitivity { get; set; }

Property Value

double

The move sensitivity.

OITDepthPeelingIteration

Sets or gets Order independent transparency depth peeling mode iteration.

public int OITDepthPeelingIteration { get; set; }

Property Value

int

OITRenderMode

Gets or sets order independent transparency render mode IsTransparent, IsTransparent

public OITRenderType OITRenderMode { get; set; }

Property Value

OITRenderType

true if [enable oit rendering]; otherwise, false.

OITWeightDepthSlope

Gets or sets the oit weight depth slope. Used to increase resolution for particular range of depth values.

If value = 2, the depth range from 0-0.5 expands to 0-1 to increase resolution. However, values from 0.5 - 1 will be pushed to 1

public double OITWeightDepthSlope { get; set; }

Property Value

double

The oit weight depth slope.

OITWeightMode

Gets or sets the oit weight mode.

Please refer to http://jcgt.org/published/0002/02/09/

Linear0: eq7; Linear1: eq8; Linear2: eq9; NonLinear: eq10

public OITWeightMode OITWeightMode { get; set; }

Property Value

OITWeightMode

The oit weight mode.

OITWeightPower

Gets or sets the Order independent transparency rendering color weight power. Used for color weight calculation.

Different near field/far field settings may need different power value for z value based weight calculation.

public double OITWeightPower { get; set; }

Property Value

double

The oit weight power.

Orthographic

Gets or sets a value indicating whether an orthographic camera should be used.

public bool Orthographic { get; set; }

Property Value

bool

true if orthographic; otherwise, false .

PageUpDownZoomSensitivity

Gets or sets the sensitivity for zoom by the page up and page down keys.

public double PageUpDownZoomSensitivity { get; set; }

Property Value

double

The zoom sensitivity.

Remarks

Use -1 to invert the zoom direction.

PanCursor

Gets or sets the pan cursor.

public Cursor PanCursor { get; set; }

Property Value

Cursor

The pan cursor.

PinchZoomAtCenter

Gets or sets a value indicating whether [pinch zoom at center] instead of at finger down point. Default is false.

public bool PinchZoomAtCenter { get; set; }

Property Value

bool

true if [pinch zoom at center]; otherwise, false.

RenderContext

Get current render context

public RenderContext? RenderContext { get; }

Property Value

RenderContext

RenderDetailOutput

Gets or sets the render detail output.

public string RenderDetailOutput { get; set; }

Property Value

string

The render detail output.

RenderException

Gets or sets the Exception that occured at rendering subsystem.

public Exception? RenderException { get; set; }

Property Value

Exception

RenderHost

Gets the render host.

public IRenderHost? RenderHost { get; }

Property Value

IRenderHost

The render host.

Renderables

Return enumerable of all the rederable elements

If enabled shared model mode, the returned rederables are current viewport renderable plus shared models

public IEnumerable<SceneNode> Renderables { get; }

Property Value

IEnumerable<SceneNode>

RotateAroundMouseDownPoint

Gets or sets a value indicating whether to rotate around the mouse down point.

public bool RotateAroundMouseDownPoint { get; set; }

Property Value

bool

true if rotating around mouse down point; otherwise, false.

RotateCursor

Gets or sets the rotate cursor.

public Cursor RotateCursor { get; set; }

Property Value

Cursor

The rotate cursor.

RotationSensitivity

Gets or sets the rotation sensitivity.

public double RotationSensitivity { get; set; }

Property Value

double

The rotation sensitivity.

SSAOIntensity

Gets or sets the ssao intensity.

public double SSAOIntensity { get; set; }

Property Value

double

The ssao intensity.

SSAOQuality

Gets or sets the ssao quality.

public SSAOQuality SSAOQuality { get; set; }

Property Value

SSAOQuality

The ssao quality.

SSAOSamplingRadius

Gets or sets the ssao sampling radius.

public double SSAOSamplingRadius { get; set; }

Property Value

double

The ssao sampling radius.

SharedModelContainer

Binding to the element inherit with IModelContainer

public IModelContainer? SharedModelContainer { get; set; }

Property Value

IModelContainer

SharedModelContainerInternal

Gets or sets the shared model container internal.

protected IModelContainer? SharedModelContainerInternal { get; }

Property Value

IModelContainer

The shared model container internal.

ShowCameraInfo

Gets or sets a value indicating whether to show camera info.

public bool ShowCameraInfo { get; set; }

Property Value

bool

true if camera info should be shown; otherwise, false .

ShowCameraTarget

Gets or sets a value indicating whether to show the camera target adorner.

public bool ShowCameraTarget { get; set; }

Property Value

bool

true if camera target should be shown; otherwise, false .

ShowCoordinateSystem

Gets or sets a value indicating whether to show the coordinate system.

public bool ShowCoordinateSystem { get; set; }

Property Value

bool

true if coordinate system should be shown; otherwise, false .

ShowFrameDetails

Gets or sets a value indicating whether [show frame details].

public bool ShowFrameDetails { get; set; }

Property Value

bool

true if [show frame details]; otherwise, false.

ShowFrameRate

Gets or sets a value indicating whether to show frame rate.

public bool ShowFrameRate { get; set; }

Property Value

bool

true if frame rate should be shown; otherwise, false .

ShowTriangleCountInfo

Gets or sets a value indicating whether to show the total number of triangles in the scene.

public bool ShowTriangleCountInfo { get; set; }

Property Value

bool

ShowViewCube

Gets or sets a value indicating whether to show the view cube.

public bool ShowViewCube { get; set; }

Property Value

bool

true if the view cube should be shown; otherwise, false .

SpinReleaseTime

Gets or sets the spin release time in milliseconds (maximum allowed time to start a spin).

public int SpinReleaseTime { get; set; }

Property Value

int

The spin release time (in milliseconds).

SubTitle

Gets or sets the sub title.

public string? SubTitle { get; set; }

Property Value

string

The sub title.

SubTitleSize

Gets or sets the size of the sub title.

public double SubTitleSize { get; set; }

Property Value

double

The size of the sub title.

TextBrush

Gets or sets the text brush.

public Brush TextBrush { get; set; }

Property Value

Brush

The text brush.

Title

Gets or sets the title.

public string? Title { get; set; }

Property Value

string

The title.

TitleBackground

Gets or sets the title background brush.

public Brush TitleBackground { get; set; }

Property Value

Brush

The title background.

TitleFontFamily

Gets or sets the title font family.

public string? TitleFontFamily { get; set; }

Property Value

string

The title font family.

TitleSize

Gets or sets the size of the title.

public double TitleSize { get; set; }

Property Value

double

The size of the title.

UpDownPanSensitivity

Gets or sets the sensitivity for pan by the up and down keys.

public double UpDownPanSensitivity { get; set; }

Property Value

double

The pan sensitivity.

Remarks

Use -1 to invert the pan direction.

UpDownRotationSensitivity

Gets or sets the sensitivity for rotation by the up and down keys.

public double UpDownRotationSensitivity { get; set; }

Property Value

double

The rotation sensitivity.

Remarks

Use -1 to invert the rotation direction.

UseDefaultGestures

Gets or sets a value indicating whether to use default mouse/keyboard gestures.

public bool UseDefaultGestures { get; set; }

Property Value

bool

true if default gestures should be used; otherwise, false.

ViewCubeHorizontalPosition

Gets or sets the horizontal position of the view cube viewport. Relative to viewport center

Default: 0.8

public double ViewCubeHorizontalPosition { get; set; }

Property Value

double

The horizontal position.

ViewCubeSize

Gets or sets the width of the view cube viewport.

public double ViewCubeSize { get; set; }

Property Value

double

The width of the view cube viewport.

ViewCubeTexture

Gets or sets the view cube texture; The view cube texture. It must be a 6x1 (ex: 600x100) ratio image. You can also use BitmapExtension.CreateViewBoxBitmapSource to create

public TextureModel? ViewCubeTexture { get; set; }

Property Value

TextureModel

The view cube texture.

ViewCubeVerticalPosition

Gets or sets the vertical position of view cube viewport. Relative to viewport center

Default: -0.8

public double ViewCubeVerticalPosition { get; set; }

Property Value

double

The vertical position.

ViewportRectangle

Gets the viewport rectangle.

public Rectangle ViewportRectangle { get; }

Property Value

Rectangle

The viewport rectangle.

ZoomAroundMouseDownPoint

Gets or sets a value indicating whether to zoom around the mouse down point.

public bool ZoomAroundMouseDownPoint { get; set; }

Property Value

bool

true if zooming around the mouse down point; otherwise, false.

ZoomCursor

Gets or sets the zoom cursor.

public Cursor ZoomCursor { get; set; }

Property Value

Cursor

The zoom cursor.

ZoomDistanceLimitFar

Gets or sets a value indicating the far distance limit for zoom.

public double ZoomDistanceLimitFar { get; set; }

Property Value

double

ZoomDistanceLimitNear

Gets or sets a value indicating the near distance limit for zoom.

public double ZoomDistanceLimitNear { get; set; }

Property Value

double

ZoomExtentsWhenLoaded

Gets or sets a value indicating whether to Zoom extents when the control has loaded.

public bool ZoomExtentsWhenLoaded { get; set; }

Property Value

bool

ZoomRectangleCursor

Gets or sets the zoom rectangle cursor.

public Cursor ZoomRectangleCursor { get; set; }

Property Value

Cursor

The zoom rectangle cursor.

ZoomSensitivity

Gets or sets the zoom sensitivity.

public double ZoomSensitivity { get; set; }

Property Value

double

The zoom sensitivity.

Methods

AddMoveForce(double, double, double)

Adds the specified move force.

public void AddMoveForce(double dx, double dy, double dz)

Parameters

dx double

The delta x.

dy double

The delta y.

dz double

The delta z.

AddMoveForce(Vector3D)

Adds the specified move force.

public void AddMoveForce(Vector3D delta)

Parameters

delta Vector3D

The delta.

AddPanForce(double, double)

Adds the specified pan force.

public void AddPanForce(double dx, double dy)

Parameters

dx double

The delta x.

dy double

The delta y.

AddPanForce(Vector3D)

The add pan force.

public void AddPanForce(Vector3D pan)

Parameters

pan Vector3D

The pan.

AddRotateForce(double, double)

The add rotate force.

public void AddRotateForce(double dx, double dy)

Parameters

dx double

The delta x.

dy double

The delta y.

AddZoomForce(double)

Adds the zoom force.

public void AddZoomForce(double dx)

Parameters

dx double

The delta.

AddZoomForce(double, Point3D)

Adds the zoom force.

public void AddZoomForce(double dx, Point3D zoomOrigin)

Parameters

dx double

The delta.

zoomOrigin Point3D

The zoom origin.

Attach(IRenderHost)

Attaches the elements to the specified host.

public void Attach(IRenderHost host)

Parameters

host IRenderHost

The host.

ChangeDirection(Vector3D, Vector3D, double)

Changes the direction of the camera.

public void ChangeDirection(Vector3D lookDir, Vector3D upDir, double animationTime = 500)

Parameters

lookDir Vector3D

The look direction.

upDir Vector3D

The up direction.

animationTime double

The animation time.

Detach()

Detaches the elements.

public void Detach()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

EmulateMouseDownByTouch(MouseButtonEventArgs)

public void EmulateMouseDownByTouch(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

EmulateMouseMoveByTouch(Point)

Emulates the mouse move by touch.

public void EmulateMouseMoveByTouch(Point pt)

Parameters

pt Point

The pt.

EmulateMouseUpByTouch(MouseButtonEventArgs)

public void EmulateMouseUpByTouch(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

FindNearestPoint(Point)

Finds the nearest 3D point in the scene.

public Point3D? FindNearestPoint(Point pt)

Parameters

pt Point

The screen point (2D).

Returns

Point3D?

A Point3D or null.

FindVisualAncestor<T>(DependencyObject)

public static T? FindVisualAncestor<T>(DependencyObject obj) where T : DependencyObject

Parameters

obj DependencyObject

Returns

T

Type Parameters

T

GetPressedMouseButtons()

Gets the pressed mouse buttons as flags of MouseButton. If no button is pressed (result is zero), then it was a touch down.

public static MouseButton GetPressedMouseButtons()

Returns

MouseButton

The pressed mouse buttons as flags of MouseButton.

HideTargetAdorner()

Hides the target adorner.

public void HideTargetAdorner()

HideZoomRectangle()

Hides the zoom rectangle.

public void HideZoomRectangle()

HittedSomething(MouseEventArgs)

public bool HittedSomething(MouseEventArgs e)

Parameters

e MouseEventArgs

Returns

bool

InvalidateRender()

Tries to invalidate the current render.

public void InvalidateRender()

InvalidateSceneGraph()

Invalidates the scene graph.

public void InvalidateSceneGraph()

IsModelUpDirectionY()

Determines whether the model up direction is (0,1,0).

public bool IsModelUpDirectionY()

Returns

bool

true if the up direction is (0,1,0); otherwise, false.

LookAt(Point3D)

Change the camera to look at the specified point.

public void LookAt(Point3D p)

Parameters

p Point3D

The point.

LookAt(Point3D, double)

Change the camera to look at the specified point.

public void LookAt(Point3D p, double animationTime)

Parameters

p Point3D

The point.

animationTime double

The animation time.

LookAt(Point3D, double, double)

Change the camera to look at the specified point.

public void LookAt(Point3D p, double distance, double animationTime)

Parameters

p Point3D

The point.

distance double

The distance.

animationTime double

The animation time.

LookAt(Point3D, Vector3D, double)

Change the camera to look at the specified point.

public void LookAt(Point3D p, Vector3D direction, double animationTime)

Parameters

p Point3D

The point.

direction Vector3D

The direction.

animationTime double

The animation time.

MeasureOverride(Size)

Called to remeasure a control.

protected override Size MeasureOverride(Size constraint)

Parameters

constraint Size

The maximum size that the method can return.

Returns

Size

The size of the control, up to the maximum specified by constraint.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

Exceptions

HelixToolkitException

{0} is missing from the template.

OnKeyDown(KeyEventArgs)

Invoked when an unhandled System.Windows.Input.Keyboard.KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnKeyDown(KeyEventArgs e)

Parameters

e KeyEventArgs

The KeyEventArgs that contains the event data.

OnManipulationCompleted(ManipulationCompletedEventArgs)

Called when the ManipulationCompleted event occurs.

protected override void OnManipulationCompleted(ManipulationCompletedEventArgs e)

Parameters

e ManipulationCompletedEventArgs

The data for the event.

OnManipulationDelta(ManipulationDeltaEventArgs)

Called when the ManipulationDelta event occurs.

protected override void OnManipulationDelta(ManipulationDeltaEventArgs e)

Parameters

e ManipulationDeltaEventArgs

The data for the event.

OnManipulationStarted(ManipulationStartedEventArgs)

Called when the ManipulationStarted event occurs.

protected override void OnManipulationStarted(ManipulationStartedEventArgs e)

Parameters

e ManipulationStartedEventArgs

The data for the event.

OnMouseDown(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnMouseDown(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. This event data reports details about the mouse button that was pressed and the handled state.

OnMouseMove(MouseEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnMouseMove(MouseEventArgs e)

Parameters

e MouseEventArgs

The MouseEventArgs that contains the event data.

OnMouseUp(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnMouseUp(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the mouse button was released.

OnMouseWheel(MouseWheelEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnMouseWheel(MouseWheelEventArgs e)

Parameters

e MouseWheelEventArgs

The MouseWheelEventArgs that contains the event data.

OnPreviewMouseDown(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.PreviewMouseDown attached routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnPreviewMouseDown(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that one or more mouse buttons were pressed.

OnPreviewTouchMove(TouchEventArgs)

Provides class handling for the PreviewTouchMove routed event that occurs when a touch moves while inside this element.

protected override void OnPreviewTouchMove(TouchEventArgs e)

Parameters

e TouchEventArgs

A TouchEventArgs that contains the event data.

OnTouchDown(TouchEventArgs)

Provides class handling for the TouchDown routed event that occurs when a touch presses inside this element.

protected override void OnTouchDown(TouchEventArgs e)

Parameters

e TouchEventArgs

A TouchEventArgs that contains the event data.

Remarks

This makes selection via Touch work without disabling the CameraController which uses Manipulation.

OnTouchUp(TouchEventArgs)

Provides class handling for the TouchUp routed event that occurs when a touch is released inside this element.

protected override void OnTouchUp(TouchEventArgs e)

Parameters

e TouchEventArgs

A TouchEventArgs that contains the event data.

RaiseCameraChangedEvent()

Raises the camera changed event.

protected virtual void RaiseCameraChangedEvent()

Reset()

Resets the view.

public void Reset()

SetView(Point3D, Vector3D, Vector3D, double)

Change the camera position and directions.

public void SetView(Point3D newPosition, Vector3D newDirection, Vector3D newUpDirection, double animationTime)

Parameters

newPosition Point3D

The new camera position.

newDirection Vector3D

The new camera look direction.

newUpDirection Vector3D

The new camera up direction.

animationTime double

The animation time.

ShowTargetAdorner(Point)

Shows the target adorner.

public void ShowTargetAdorner(Point position)

Parameters

position Point

The position.

ShowZoomRectangle(Rect)

Shows the zoom rectangle.

public void ShowZoomRectangle(Rect rect)

Parameters

rect Rect

The zoom rectangle.

StartSpin(Vector, Point, Point3D)

Starts spinning.

public void StartSpin(Vector speed, Point position, Point3D aroundPoint)

Parameters

speed Vector

The speed.

position Point

The position.

aroundPoint Point3D

The point to spin around.

StopSpin()

Stops the spinning.

public void StopSpin()

Update(TimeSpan)

public void Update(TimeSpan timeStamp)

Parameters

timeStamp TimeSpan

ZoomExtents(double)

Zooms to the extents of the model.

public void ZoomExtents(double animationTime = 200)

Parameters

animationTime double

The animation time (milliseconds).

ZoomExtents(Rect3D, double)

Zooms to the extents of the specified bounding box.

public void ZoomExtents(Rect3D bounds, double animationTime = 0)

Parameters

bounds Rect3D

The bounding box.

animationTime double

The animation time.

Events

CameraChanged

Event when a property has been changed

public event RoutedEventHandler CameraChanged

Event Type

RoutedEventHandler

FormMouseMove

Occurs when [form mouse move].

public event WinformHostExtend.FormMouseMoveEventHandler FormMouseMove

Event Type

WinformHostExtend.FormMouseMoveEventHandler

FormMouseWheel

Occurs when [form mouse wheel].

public event WinformHostExtend.FormMouseWheelEventHandler FormMouseWheel

Event Type

WinformHostExtend.FormMouseWheelEventHandler

MouseDown3D

Provide CLR accessors for the event

public event RoutedEventHandler MouseDown3D

Event Type

RoutedEventHandler

MouseMove3D

Provide CLR accessors for the event

public event RoutedEventHandler MouseMove3D

Event Type

RoutedEventHandler

MouseUp3D

Provide CLR accessors for the event

public event RoutedEventHandler MouseUp3D

Event Type

RoutedEventHandler

OnRendered

Occurs when each render frame finished rendering. Called directly from RenderHost after each frame. Use this event carefully. Unsubscrible this event when not used. Otherwise may cause performance issue.

public event EventHandler? OnRendered

Event Type

EventHandler

RenderExceptionOccurred

Fired whenever an exception occurred at rendering subsystem.

public event EventHandler<RelayExceptionEventArgs> RenderExceptionOccurred

Event Type

EventHandler<RelayExceptionEventArgs>