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
AllowUpDownRotationProperty
public static readonly DependencyProperty AllowUpDownRotationProperty
Field Value
BackgroundColorProperty
Background Color property.this.RenderHost
public static readonly DependencyProperty BackgroundColorProperty
Field Value
BelongsToParentWindowProperty
The belongs to parent window property
public static readonly DependencyProperty BelongsToParentWindowProperty
Field Value
CameraChangedEvent
The camera changed event.
public static readonly RoutedEvent CameraChangedEvent
Field Value
CameraInertiaFactorProperty
The camera inertia factor property.
public static readonly DependencyProperty CameraInertiaFactorProperty
Field Value
CameraModeProperty
The camera mode property
public static readonly DependencyProperty CameraModeProperty
Field Value
CameraProperty
The camera property
public static readonly DependencyProperty CameraProperty
Field Value
CameraRotationModeProperty
The camera rotation mode property
public static readonly DependencyProperty CameraRotationModeProperty
Field Value
ChangeFieldOfViewCursorProperty
The change fov cursor property.
public static readonly DependencyProperty ChangeFieldOfViewCursorProperty
Field Value
Content2DProperty
The content 2d property
public static readonly DependencyProperty Content2DProperty
Field Value
CoordinateSystemAxisXColorProperty
The coordinate system color X property
public static readonly DependencyProperty CoordinateSystemAxisXColorProperty
Field Value
CoordinateSystemAxisYColorProperty
The coordinate system Color Y property
public static readonly DependencyProperty CoordinateSystemAxisYColorProperty
Field Value
CoordinateSystemAxisZColorProperty
The coordinate system Color Z property
public static readonly DependencyProperty CoordinateSystemAxisZColorProperty
Field Value
CoordinateSystemHorizontalPositionProperty
The coordinate system horizontal position property. Relative to viewport center
Default: -0.8
public static readonly DependencyProperty CoordinateSystemHorizontalPositionProperty
Field Value
CoordinateSystemLabelForegroundProperty
The coordinate system label foreground property
public static readonly DependencyProperty CoordinateSystemLabelForegroundProperty
Field Value
CoordinateSystemLabelXProperty
The coordinate system label X property
public static readonly DependencyProperty CoordinateSystemLabelXProperty
Field Value
CoordinateSystemLabelYProperty
The coordinate system label Y property
public static readonly DependencyProperty CoordinateSystemLabelYProperty
Field Value
CoordinateSystemLabelZProperty
The coordinate system label Z property
public static readonly DependencyProperty CoordinateSystemLabelZProperty
Field Value
CoordinateSystemSizeProperty
The coordinate system size property.
public static readonly DependencyProperty CoordinateSystemSizeProperty
Field Value
CoordinateSystemVerticalPositionProperty
The coordinate system vertical position property. Relative to viewport center.
Default: -0.8
public static readonly DependencyProperty CoordinateSystemVerticalPositionProperty
Field Value
CursorOnElementPositionProperty
Identifies the CursorOnElementPosition dependency property.
public static readonly DependencyProperty CursorOnElementPositionProperty
Field Value
Remarks
This property returns the position of the nearest model.
CursorPositionProperty
Identifies the CursorPosition dependency property.
public static readonly DependencyProperty CursorPositionProperty
Field Value
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
DpiScaleProperty
The dpi scale
public static readonly DependencyProperty DpiScaleProperty
Field Value
EffectsManagerProperty
The EffectsManager property.
public static readonly DependencyProperty EffectsManagerProperty
Field Value
EnableAutoOctreeUpdateProperty
The enable automatic octree update property
public static readonly DependencyProperty EnableAutoOctreeUpdateProperty
Field Value
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
EnableD2DRenderingProperty
The enable d2d rendering property
public static readonly DependencyProperty EnableD2DRenderingProperty
Field Value
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
EnableDesignModeRenderingProperty
The enable design mode rendering property
public static readonly DependencyProperty EnableDesignModeRenderingProperty
Field Value
EnableDpiScaleProperty
The enable dpi scale property
public static readonly DependencyProperty EnableDpiScaleProperty
Field Value
EnableMouseButtonHitTestProperty
Enable mouse button hit test
public static readonly DependencyProperty EnableMouseButtonHitTestProperty
Field Value
EnableOITDepthPeelingDynamicIterationProperty
public static readonly DependencyProperty EnableOITDepthPeelingDynamicIterationProperty
Field Value
EnableRenderFrustumProperty
Enable render frustum to avoid rendering model if it is out of view frustum
public static readonly DependencyProperty EnableRenderFrustumProperty
Field Value
EnableRenderOrderProperty
The enable render order property. EnableRenderOrder
public static readonly DependencyProperty EnableRenderOrderProperty
Field Value
EnableSSAOProperty
The enable ssao property
public static readonly DependencyProperty EnableSSAOProperty
Field Value
EnableSharedModelModeProperty
Used to create multiple viewport with shared models.
public static readonly DependencyProperty EnableSharedModelModeProperty
Field Value
EnableSwapChainRenderingProperty
The enable swap chain rendering property
public static readonly DependencyProperty EnableSwapChainRenderingProperty
Field Value
FXAALevelProperty
The fxaa level property
public static readonly DependencyProperty FXAALevelProperty
Field Value
FieldOfViewTextProperty
The field of view text property.
public static readonly DependencyProperty FieldOfViewTextProperty
Field Value
FixedRotationPointEnabledProperty
Enable fixed rotation mode and use FixedRotationPoint for rotation. Only works under CameraMode = Inspect
public static readonly DependencyProperty FixedRotationPointEnabledProperty
Field Value
FixedRotationPointProperty
Rotate around this fixed rotation point only.FixedRotationPointEnabledProperty
public static readonly DependencyProperty FixedRotationPointProperty
Field Value
FrameRateProperty
The frame rate property.
public static readonly DependencyProperty FrameRateProperty
Field Value
FrameRateTextProperty
The frame rate text property.
public static readonly DependencyProperty FrameRateTextProperty
Field Value
IncreaseSwapchainFPSProperty
public static readonly DependencyProperty IncreaseSwapchainFPSProperty
Field Value
InfiniteSpinProperty
The infinite spin property.
public static readonly DependencyProperty InfiniteSpinProperty
Field Value
InfoBackgroundProperty
The info background property.
public static readonly DependencyProperty InfoBackgroundProperty
Field Value
InfoForegroundProperty
The info foreground property.
public static readonly DependencyProperty InfoForegroundProperty
Field Value
IsChangeFieldOfViewEnabledProperty
The is change field of view enabled property
public static readonly DependencyProperty IsChangeFieldOfViewEnabledProperty
Field Value
IsCoordinateSystemMoverEnabledProperty
The is coordinate system mover enabled property
public static readonly DependencyProperty IsCoordinateSystemMoverEnabledProperty
Field Value
IsInertiaEnabledProperty
Identifies the IsInertiaEnabled dependency property.
public static readonly DependencyProperty IsInertiaEnabledProperty
Field Value
IsMoveEnabledProperty
The is move enabled property.
public static readonly DependencyProperty IsMoveEnabledProperty
Field Value
IsPanEnabledProperty
The is pan enabled property
public static readonly DependencyProperty IsPanEnabledProperty
Field Value
IsPinchZoomEnabledProperty
The IsTouchZoomEnabled property.
public static readonly DependencyProperty IsPinchZoomEnabledProperty
Field Value
IsRotationEnabledProperty
The is rotation enabled property
public static readonly DependencyProperty IsRotationEnabledProperty
Field Value
IsShadowMappingEnabledProperty
The is deferred shading enabled propery
public static readonly DependencyProperty IsShadowMappingEnabledProperty
Field Value
IsThreeFingerPanningEnabledProperty
The enable touch rotate property
public static readonly DependencyProperty IsThreeFingerPanningEnabledProperty
Field Value
IsTouchRotateEnabledProperty
The enable touch rotate property
public static readonly DependencyProperty IsTouchRotateEnabledProperty
Field Value
IsViewCubeEdgeClicksEnabledProperty
Identifies the IsViewCubeEdgeClicksEnabled dependency property.
public static readonly DependencyProperty IsViewCubeEdgeClicksEnabledProperty
Field Value
IsViewCubeMoverEnabledProperty
Identifies the IsViewCubeEdgeClicksEnabled dependency property.
public static readonly DependencyProperty IsViewCubeMoverEnabledProperty
Field Value
IsZoomEnabledProperty
The is zoom enabled property
public static readonly DependencyProperty IsZoomEnabledProperty
Field Value
LeftRightPanSensitivityProperty
The left right pan sensitivity property.
public static readonly DependencyProperty LeftRightPanSensitivityProperty
Field Value
LeftRightRotationSensitivityProperty
The left right rotation sensitivity property.
public static readonly DependencyProperty LeftRightRotationSensitivityProperty
Field Value
MSAAProperty
Set MSAA Level
public static readonly DependencyProperty MSAAProperty
Field Value
ManualLookAtPointProperty
Manually move camera to look at a point in 3D space
public static readonly DependencyProperty ManualLookAtPointProperty
Field Value
MaximumFieldOfViewProperty
The maximum field of view property
public static readonly DependencyProperty MaximumFieldOfViewProperty
Field Value
MessageTextProperty
The message text property.
public static readonly DependencyProperty MessageTextProperty
Field Value
MinimumFieldOfViewProperty
The minimum field of view property
public static readonly DependencyProperty MinimumFieldOfViewProperty
Field Value
MinimumUpdateCountProperty
The minimum update count property
public static readonly DependencyProperty MinimumUpdateCountProperty
Field Value
ModelUpDirectionProperty
The model up direction property
public static readonly DependencyProperty ModelUpDirectionProperty
Field Value
MoveSensitivityProperty
Identifies the MoveSensitivity dependency property.
public static readonly DependencyProperty MoveSensitivityProperty
Field Value
OITDepthPeelingIterationProperty
public static readonly DependencyProperty OITDepthPeelingIterationProperty
Field Value
OITRenderModeProperty
Gets or sets a value indicating for Transparent objects render mode. IsTransparent, IsTransparent
public static readonly DependencyProperty OITRenderModeProperty
Field Value
OITWeightDepthSlopeProperty
The oit weight depth slope property
public static readonly DependencyProperty OITWeightDepthSlopeProperty
Field Value
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
OITWeightPowerProperty
The Order independent transparency rendering color weight power property
public static readonly DependencyProperty OITWeightPowerProperty
Field Value
OrthographicProperty
The orthographic property.
public static readonly DependencyProperty OrthographicProperty
Field Value
PageUpDownZoomSensitivityProperty
Identifies the PageUpDownZoomSensitivity dependency property.
public static readonly DependencyProperty PageUpDownZoomSensitivityProperty
Field Value
PanCursorProperty
The pan cursor property
public static readonly DependencyProperty PanCursorProperty
Field Value
PinchZoomAtCenterProperty
The pinch zoom at center property
public static readonly DependencyProperty PinchZoomAtCenterProperty
Field Value
RenderDetailOutputProperty
The render detail output property
public static readonly DependencyProperty RenderDetailOutputProperty
Field Value
RenderExceptionProperty
The render exception property.
public static readonly DependencyProperty RenderExceptionProperty
Field Value
RotateAroundMouseDownPointProperty
The rotate around mouse down point property
public static readonly DependencyProperty RotateAroundMouseDownPointProperty
Field Value
RotateCursorProperty
The rotate cursor property
public static readonly DependencyProperty RotateCursorProperty
Field Value
RotationSensitivityProperty
The rotation sensitivity property
public static readonly DependencyProperty RotationSensitivityProperty
Field Value
SSAOIntensityProperty
The ssao intensity property
public static readonly DependencyProperty SSAOIntensityProperty
Field Value
SSAOQualityProperty
The ssao quality property
public static readonly DependencyProperty SSAOQualityProperty
Field Value
SSAOSamplingRadiusProperty
The ssao sampling radius property
public static readonly DependencyProperty SSAOSamplingRadiusProperty
Field Value
SharedModelContainerProperty
Binding to the element inherit with IModelContainer
public static readonly DependencyProperty SharedModelContainerProperty
Field Value
ShowCameraInfoProperty
The show camera info property.
public static readonly DependencyProperty ShowCameraInfoProperty
Field Value
ShowCameraTargetProperty
The show camera target property.
public static readonly DependencyProperty ShowCameraTargetProperty
Field Value
ShowCoordinateSystemProperty
The show coordinate system property.
public static readonly DependencyProperty ShowCoordinateSystemProperty
Field Value
ShowFrameDetailsProperty
The show frame rate property.
public static readonly DependencyProperty ShowFrameDetailsProperty
Field Value
ShowFrameRateProperty
The show frame rate property.
public static readonly DependencyProperty ShowFrameRateProperty
Field Value
ShowTriangleCountInfoProperty
The show triangle count info property.
public static readonly DependencyProperty ShowTriangleCountInfoProperty
Field Value
ShowViewCubeProperty
The show view cube property.
public static readonly DependencyProperty ShowViewCubeProperty
Field Value
SpinReleaseTimeProperty
The spin release time property
public static readonly DependencyProperty SpinReleaseTimeProperty
Field Value
SubTitleProperty
The sub title property.
public static readonly DependencyProperty SubTitleProperty
Field Value
SubTitleSizeProperty
The sub title size property.
public static readonly DependencyProperty SubTitleSizeProperty
Field Value
TextBrushProperty
The text brush property.
public static readonly DependencyProperty TextBrushProperty
Field Value
TitleBackgroundProperty
The title background property.
public static readonly DependencyProperty TitleBackgroundProperty
Field Value
TitleFontFamilyProperty
The title font family property.
public static readonly DependencyProperty TitleFontFamilyProperty
Field Value
TitleProperty
The title property.
public static readonly DependencyProperty TitleProperty
Field Value
TitleSizeProperty
The title size property.
public static readonly DependencyProperty TitleSizeProperty
Field Value
UpDownPanSensitivityProperty
The up down Pan sensitivity property.
public static readonly DependencyProperty UpDownPanSensitivityProperty
Field Value
UpDownRotationSensitivityProperty
The up down rotation sensitivity property.
public static readonly DependencyProperty UpDownRotationSensitivityProperty
Field Value
UseDefaultGesturesProperty
The use default gestures property
public static readonly DependencyProperty UseDefaultGesturesProperty
Field Value
ViewCubeHorizontalPositionProperty
The view cube horizontal position property. Relative to viewport center.
Default: 0.8
public static readonly DependencyProperty ViewCubeHorizontalPositionProperty
Field Value
ViewCubeSizeProperty
The view cube size property.
public static readonly DependencyProperty ViewCubeSizeProperty
Field Value
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
ViewCubeVerticalPositionProperty
The view cube vertical position property. Relative to viewport center.
Default: -0.8
public static readonly DependencyProperty ViewCubeVerticalPositionProperty
Field Value
ZoomAroundMouseDownPointProperty
The zoom around mouse down point property
public static readonly DependencyProperty ZoomAroundMouseDownPointProperty
Field Value
ZoomCursorProperty
The zoom cursor property
public static readonly DependencyProperty ZoomCursorProperty
Field Value
ZoomDistanceLimitFarProperty
The far zoom distance limit property.
public static readonly DependencyProperty ZoomDistanceLimitFarProperty
Field Value
ZoomDistanceLimitNearProperty
The near zoom distance limit property.
public static readonly DependencyProperty ZoomDistanceLimitNearProperty
Field Value
ZoomExtentsWhenLoadedProperty
The zoom extents when loaded property.
public static readonly DependencyProperty ZoomExtentsWhenLoadedProperty
Field Value
ZoomRectangleCursorProperty
The zoom rectangle cursor property
public static readonly DependencyProperty ZoomRectangleCursorProperty
Field Value
ZoomSensitivityProperty
The zoom sensitivity property
public static readonly DependencyProperty ZoomSensitivityProperty
Field Value
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
trueif [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
trueif [allow up down rotation]; otherwise,false.
BackgroundColor
Background Color
public Color BackgroundColor { get; set; }
Property Value
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
trueif 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
EnableAutoOctreeUpdate
Gets or sets a value indicating whether [enable automatic update octree for geometry models].
public bool EnableAutoOctreeUpdate { get; set; }
Property Value
- bool
trueif [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
trueif 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
trueif [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
EnableDesignModeRendering
Gets or sets a value indicating whether [enable design mode rendering].
public bool EnableDesignModeRendering { get; set; }
Property Value
- bool
trueif [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
trueif [enable dpi scale]; otherwise,false.
EnableMouseButtonHitTest
Enable mouse button hit test
public bool EnableMouseButtonHitTest { get; set; }
Property Value
EnableOITDepthPeelingDynamicIteration
public bool EnableOITDepthPeelingDynamicIteration { get; set; }
Property Value
EnableRenderFrustum
Enable render frustum to skip rendering model if model is out of the camera bounding frustum
public bool EnableRenderFrustum { get; set; }
Property Value
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
trueif [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
trueif [enable ssao]; otherwise,false.
EnableSharedModelMode
Used to create multiple viewport with shared models.
public bool EnableSharedModelMode { get; set; }
Property Value
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
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
FixedRotationPointEnabled
Enable fixed rotation mode and use FixedRotationPoint for rotation. Only works under CameraMode = Inspect
public bool FixedRotationPointEnabled { get; set; }
Property Value
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
InfiniteSpin
Gets or sets a value indicating whether infinite spin is enabled.
public bool InfiniteSpin { get; set; }
Property Value
- bool
trueif 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
trueif 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
trueif coordinate system mover enabled; otherwise,false.
IsInDesignMode
public static bool IsInDesignMode { get; }
Property Value
IsInertiaEnabled
Gets or sets a value indicating whether inertia is enabled for the camera manipulations.
public bool IsInertiaEnabled { get; set; }
Property Value
- bool
trueif inertia is enabled; otherwise,false.
IsMoveEnabled
Gets or sets a value indicating whether move is enabled.
public bool IsMoveEnabled { get; set; }
Property Value
- bool
trueif move is enabled; otherwise,false.
IsPanEnabled
Gets or sets a value indicating whether pan is enabled.
public bool IsPanEnabled { get; set; }
Property Value
- bool
trueif 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
trueif 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
trueif 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
trueif 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
trueif [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
trueif [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
trueif 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
trueif 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
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
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
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
OITRenderMode
Gets or sets order independent transparency render mode IsTransparent, IsTransparent
public OITRenderType OITRenderMode { get; set; }
Property Value
- OITRenderType
trueif [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
trueif 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
trueif [pinch zoom at center]; otherwise,false.
RenderContext
Get current render context
public RenderContext? RenderContext { get; }
Property Value
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
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
RotateAroundMouseDownPoint
Gets or sets a value indicating whether to rotate around the mouse down point.
public bool RotateAroundMouseDownPoint { get; set; }
Property Value
- bool
trueif 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
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
trueif 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
trueif 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
trueif 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
trueif [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
trueif 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
ShowViewCube
Gets or sets a value indicating whether to show the view cube.
public bool ShowViewCube { get; set; }
Property Value
- bool
trueif 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
trueif 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
trueif 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
ZoomDistanceLimitNear
Gets or sets a value indicating the near distance limit for zoom.
public double ZoomDistanceLimitNear { get; set; }
Property Value
ZoomExtentsWhenLoaded
Gets or sets a value indicating whether to Zoom extents when the control has loaded.
public bool ZoomExtentsWhenLoaded { get; set; }
Property Value
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
AddMoveForce(Vector3D)
Adds the specified move force.
public void AddMoveForce(Vector3D delta)
Parameters
deltaVector3DThe delta.
AddPanForce(double, double)
Adds the specified pan force.
public void AddPanForce(double dx, double dy)
Parameters
AddPanForce(Vector3D)
The add pan force.
public void AddPanForce(Vector3D pan)
Parameters
panVector3DThe pan.
AddRotateForce(double, double)
The add rotate force.
public void AddRotateForce(double dx, double dy)
Parameters
AddZoomForce(double)
Adds the zoom force.
public void AddZoomForce(double dx)
Parameters
dxdoubleThe delta.
AddZoomForce(double, Point3D)
Adds the zoom force.
public void AddZoomForce(double dx, Point3D zoomOrigin)
Parameters
Attach(IRenderHost)
Attaches the elements to the specified host.
public void Attach(IRenderHost host)
Parameters
hostIRenderHostThe host.
ChangeDirection(Vector3D, Vector3D, double)
Changes the direction of the camera.
public void ChangeDirection(Vector3D lookDir, Vector3D upDir, double animationTime = 500)
Parameters
lookDirVector3DThe look direction.
upDirVector3DThe up direction.
animationTimedoubleThe 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
disposingbool
EmulateMouseDownByTouch(MouseButtonEventArgs)
public void EmulateMouseDownByTouch(MouseButtonEventArgs e)
Parameters
EmulateMouseMoveByTouch(Point)
Emulates the mouse move by touch.
public void EmulateMouseMoveByTouch(Point pt)
Parameters
ptPointThe pt.
EmulateMouseUpByTouch(MouseButtonEventArgs)
public void EmulateMouseUpByTouch(MouseButtonEventArgs e)
Parameters
FindNearestPoint(Point)
Finds the nearest 3D point in the scene.
public Point3D? FindNearestPoint(Point pt)
Parameters
ptPointThe screen point (2D).
Returns
- Point3D?
A Point3D or null.
FindVisualAncestor<T>(DependencyObject)
public static T? FindVisualAncestor<T>(DependencyObject obj) where T : DependencyObject
Parameters
objDependencyObject
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
Returns
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
trueif 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
pPoint3DThe point.
LookAt(Point3D, double)
Change the camera to look at the specified point.
public void LookAt(Point3D p, double animationTime)
Parameters
LookAt(Point3D, double, double)
Change the camera to look at the specified point.
public void LookAt(Point3D p, double distance, double animationTime)
Parameters
LookAt(Point3D, Vector3D, double)
Change the camera to look at the specified point.
public void LookAt(Point3D p, Vector3D direction, double animationTime)
Parameters
MeasureOverride(Size)
Called to remeasure a control.
protected override Size MeasureOverride(Size constraint)
Parameters
constraintSizeThe 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
eKeyEventArgsThe KeyEventArgs that contains the event data.
OnManipulationCompleted(ManipulationCompletedEventArgs)
Called when the ManipulationCompleted event occurs.
protected override void OnManipulationCompleted(ManipulationCompletedEventArgs e)
Parameters
eManipulationCompletedEventArgsThe data for the event.
OnManipulationDelta(ManipulationDeltaEventArgs)
Called when the ManipulationDelta event occurs.
protected override void OnManipulationDelta(ManipulationDeltaEventArgs e)
Parameters
eManipulationDeltaEventArgsThe data for the event.
OnManipulationStarted(ManipulationStartedEventArgs)
Called when the ManipulationStarted event occurs.
protected override void OnManipulationStarted(ManipulationStartedEventArgs e)
Parameters
eManipulationStartedEventArgsThe 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
eMouseButtonEventArgsThe 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
eMouseEventArgsThe 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
eMouseButtonEventArgsThe 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
eMouseWheelEventArgsThe 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
eMouseButtonEventArgsThe 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
eTouchEventArgsA 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
eTouchEventArgsA 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
eTouchEventArgsA 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
newPositionPoint3DThe new camera position.
newDirectionVector3DThe new camera look direction.
newUpDirectionVector3DThe new camera up direction.
animationTimedoubleThe animation time.
ShowTargetAdorner(Point)
Shows the target adorner.
public void ShowTargetAdorner(Point position)
Parameters
positionPointThe position.
ShowZoomRectangle(Rect)
Shows the zoom rectangle.
public void ShowZoomRectangle(Rect rect)
Parameters
rectRectThe zoom rectangle.
StartSpin(Vector, Point, Point3D)
Starts spinning.
public void StartSpin(Vector speed, Point position, Point3D aroundPoint)
Parameters
StopSpin()
Stops the spinning.
public void StopSpin()
Update(TimeSpan)
public void Update(TimeSpan timeStamp)
Parameters
timeStampTimeSpan
ZoomExtents(double)
Zooms to the extents of the model.
public void ZoomExtents(double animationTime = 200)
Parameters
animationTimedoubleThe animation time (milliseconds).
ZoomExtents(Rect3D, double)
Zooms to the extents of the specified bounding box.
public void ZoomExtents(Rect3D bounds, double animationTime = 0)
Parameters
Events
CameraChanged
Event when a property has been changed
public event RoutedEventHandler CameraChanged
Event Type
FormMouseMove
Occurs when [form mouse move].
public event WinformHostExtend.FormMouseMoveEventHandler FormMouseMove
Event Type
FormMouseWheel
Occurs when [form mouse wheel].
public event WinformHostExtend.FormMouseWheelEventHandler FormMouseWheel
Event Type
MouseDown3D
Provide CLR accessors for the event
public event RoutedEventHandler MouseDown3D
Event Type
MouseMove3D
Provide CLR accessors for the event
public event RoutedEventHandler MouseMove3D
Event Type
MouseUp3D
Provide CLR accessors for the event
public event RoutedEventHandler MouseUp3D
Event Type
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
RenderExceptionOccurred
Fired whenever an exception occurred at rendering subsystem.
public event EventHandler<RelayExceptionEventArgs> RenderExceptionOccurred