Class RelativePositionCanvas2D
- Namespace
- HelixToolkit.WinUI.SharpDX.Elements2D
- Assembly
- HelixToolkit.WinUI.SharpDX.dll
Position content using relative position.
Relative position (0,0) is the center of the canvas. LeftTop = (-1,1); RightTop = (1,1); LeftBottom = (-1,-1); RightBottom = (1, -1)
public class RelativePositionCanvas2D : Panel2D, IEquatable<DependencyObject>, IAnimationObject, IVisualElement, IVisualElement2, IEquatable<UIElement>, IEquatable<FrameworkElement>, IWinRTObject, IDynamicInterfaceCastable, IEquatable<Control>, IDisposable, ITransformable2D, IHitable2D
- Inheritance
-
RelativePositionCanvas2D
- Implements
-
IWinRTObject
- Inherited Members
Fields
RelativeXProperty
The relative x property
public static readonly DependencyProperty RelativeXProperty
Field Value
RelativeYProperty
The relative y property
public static readonly DependencyProperty RelativeYProperty
Field Value
Methods
GetRelativeX(Element2DCore)
Gets the relative x.
public static double GetRelativeX(Element2DCore element)
Parameters
elementElement2DCoreThe element.
Returns
GetRelativeY(Element2DCore)
Gets the relative y.
public static double GetRelativeY(Element2DCore element)
Parameters
elementElement2DCoreThe element.
Returns
OnCreateSceneNode()
Called when [create scene node].
protected override SceneNode2D OnCreateSceneNode()
Returns
SetRelativeX(Element2DCore, double)
Sets the relative x.
public static void SetRelativeX(Element2DCore element, double value)
Parameters
elementElement2DCoreThe element.
valuedoubleThe value.
SetRelativeY(Element2DCore, double)
Sets the relative y.
public static void SetRelativeY(Element2DCore element, double value)
Parameters
elementElement2DCoreThe element.
valuedoubleThe value.