UIElementExtensions Class
Namespace: Stride.UIAssembly: Stride.UI.dll
Extensions methods for UIElement
public static class UIElementExtensions
Name | Description | |
---|---|---|
Methods | ||
GetCanvasAbsolutePosition(UIElement) | Gets the absolute position of the element into its parent canvas. The position is in virtual pixels. |
|
GetCanvasPinOrigin(UIElement) | Gets the origin of the element used when pinning it into its parent canvas. This value is normalized between [0,1]. (0,0,0) represents the left/top/back corner, (1,1,1) represents the right/bottom/front corner, etc... |
|
GetCanvasRelativePosition(UIElement) | Gets the relative position of the element into its parent canvas. Position is normalized between [0,1]. |
|
GetCanvasRelativeSize(UIElement) | Gets the relative position of the element with respect to its parent canvas. |
|
GetGridColumn(UIElement) | Gets the column index of the grid in which resides the element. |
|
GetGridColumnSpan(UIElement) | Gets the number of column spans that the element occupies in the grid. |
|
GetGridLayer(UIElement) | Gets the layer index of the grid in which resides the element. |
|
GetGridLayerSpan(UIElement) | Gets the number of layer spans that the element occupies in the grid. |
|
GetGridRow(UIElement) | Gets the row index of the grid in which resides the element. |
|
GetGridRowSpan(UIElement) | Gets the number of row spans that the element occupies in the grid. |
|
GetPanelZIndex(UIElement) | Sets the Panel Z-index value for this element. The Panel Z-index value is used to determine which child of a same panel should be drawn on top. |
|
SetCanvasAbsolutePosition(UIElement, Vector3) | Sets the absolute position of the element into its parent canvas. |
|
SetCanvasPinOrigin(UIElement, Vector3) | Sets the origin of the element used when pinning it into its parent canvas. This value is normalized between [0,1]. (0,0,0) represents the left/top/back corner, (1,1,1) represents the right/bottom/front corner, etc... |
|
SetCanvasRelativePosition(UIElement, Vector3) | Sets the relative position of the element into its parent canvas. |
|
SetCanvasRelativeSize(UIElement, Vector3) | Sets the relative position of the element with respect to its parent canvas.
Set the value of any component to |
|
SetGridColumn(UIElement, Int32) | Sets the column index of the grid in which resides the element. |
|
SetGridColumnSpan(UIElement, Int32) | Sets the number of column spans that the element occupies in the grid. |
|
SetGridLayer(UIElement, Int32) | Sets the layer index of the grid in which resides the element. |
|
SetGridLayerSpan(UIElement, Int32) | Sets the number of layer spans that the element occupies in the grid. |
|
SetGridRow(UIElement, Int32) | Sets the row index of the grid in which resides the element. |
|
SetGridRowSpan(UIElement, Int32) | Sets the number of row spans that the element occupies in the grid. |
|
SetPanelZIndex(UIElement, Int32) | Sets the Panel Z-index value for this element. The Panel Z-index value is used to determine which child of a same panel should be drawn on top. |
Methods
GetCanvasAbsolutePosition(UIElement)
Gets the absolute position of the element into its parent canvas. The position is in virtual pixels.
public static Vector3 GetCanvasAbsolutePosition(this UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Returns
Type | Description |
---|---|
Vector3 | The absolute position of the element into its parent canvas |
Remarks
Equivalent to get the AbsolutePositionPropertyKey of the element
GetCanvasPinOrigin(UIElement)
Gets the origin of the element used when pinning it into its parent canvas. This value is normalized between [0,1]. (0,0,0) represents the left/top/back corner, (1,1,1) represents the right/bottom/front corner, etc...
public static Vector3 GetCanvasPinOrigin(this UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Returns
Type | Description |
---|---|
Vector3 | The pin origin of the element |
Remarks
Equivalent to get the PinOriginPropertyKey of the element
GetCanvasRelativePosition(UIElement)
Gets the relative position of the element into its parent canvas. Position is normalized between [0,1].
public static Vector3 GetCanvasRelativePosition(this UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Returns
Type | Description |
---|---|
Vector3 | The relative position of the element into its parent canvas |
Remarks
Equivalent to get the RelativePositionPropertyKey of the element
GetCanvasRelativeSize(UIElement)
Gets the relative position of the element with respect to its parent canvas.
public static Vector3 GetCanvasRelativeSize(this UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Returns
Type | Description |
---|---|
Vector3 | The relative position of the element to its parent canvas |
Remarks
Equivalent to get the RelativeSizePropertyKey of the element
GetGridColumn(UIElement)
Gets the column index of the grid in which resides the element.
public static int GetGridColumn(this UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Returns
Type | Description |
---|---|
System.Int32 | The 0-based column index of the element |
Remarks
Equivalent to get the ColumnPropertyKey of the element
GetGridColumnSpan(UIElement)
Gets the number of column spans that the element occupies in the grid.
public static int GetGridColumnSpan(this UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Returns
Type | Description |
---|---|
System.Int32 | The number column of spans occupied by the element |
Remarks
Equivalent to get the ColumnSpanPropertyKey of the element
GetGridLayer(UIElement)
Gets the layer index of the grid in which resides the element.
public static int GetGridLayer(this UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Returns
Type | Description |
---|---|
System.Int32 | The 0-based layer index of the element |
Remarks
Equivalent to get the LayerPropertyKey of the element
GetGridLayerSpan(UIElement)
Gets the number of layer spans that the element occupies in the grid.
public static int GetGridLayerSpan(this UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Returns
Type | Description |
---|---|
System.Int32 | The number of layer spans occupied by the element |
Remarks
Equivalent to get the LayerSpanPropertyKey of the element
GetGridRow(UIElement)
Gets the row index of the grid in which resides the element.
public static int GetGridRow(this UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Returns
Type | Description |
---|---|
System.Int32 | The 0-based row index of the element |
Remarks
Equivalent to get the RowPropertyKey of the element
GetGridRowSpan(UIElement)
Gets the number of row spans that the element occupies in the grid.
public static int GetGridRowSpan(this UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Returns
Type | Description |
---|---|
System.Int32 | The number of row spans occupied by the element |
Remarks
Equivalent to get the RowSpanPropertyKey of the element
GetPanelZIndex(UIElement)
Sets the Panel Z-index value for this element. The Panel Z-index value is used to determine which child of a same panel should be drawn on top.
public static int GetPanelZIndex(this UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Returns
Type | Description |
---|---|
System.Int32 | The Panel Z-index value of the element |
Remarks
Equivalent to get the ZIndexPropertyKey of the element
SetCanvasAbsolutePosition(UIElement, Vector3)
Sets the absolute position of the element into its parent canvas.
public static void SetCanvasAbsolutePosition(this UIElement element, Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Vector3 | position | The absolute position in virtual pixels |
Remarks
Equivalent to set the AbsolutePositionPropertyKey of the element
SetCanvasPinOrigin(UIElement, Vector3)
Sets the origin of the element used when pinning it into its parent canvas. This value is normalized between [0,1]. (0,0,0) represents the left/top/back corner, (1,1,1) represents the right/bottom/front corner, etc...
public static void SetCanvasPinOrigin(this UIElement element, Vector3 origin)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Vector3 | origin | The pin origin value |
Remarks
Equivalent to set the PinOriginPropertyKey of the element
SetCanvasRelativePosition(UIElement, Vector3)
Sets the relative position of the element into its parent canvas.
public static void SetCanvasRelativePosition(this UIElement element, Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Vector3 | position | The relative position normalized between [0,1] |
Remarks
Equivalent to set the RelativePositionPropertyKey of the element
SetCanvasRelativeSize(UIElement, Vector3)
Sets the relative position of the element with respect to its parent canvas.
Set the value of any component to
public static void SetCanvasRelativeSize(this UIElement element, Vector3 size)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
Vector3 | size | The relative position of the element |
Remarks
Equivalent to set the RelativeSizePropertyKey of the element
SetGridColumn(UIElement, Int32)
Sets the column index of the grid in which resides the element.
public static void SetGridColumn(this UIElement element, int index)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
System.Int32 | index | The 0-based column index |
Remarks
Equivalent to set the ColumnPropertyKey of the element
SetGridColumnSpan(UIElement, Int32)
Sets the number of column spans that the element occupies in the grid.
public static void SetGridColumnSpan(this UIElement element, int index)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
System.Int32 | index | The number of column spans occupied |
Remarks
Equivalent to set the ColumnSpanPropertyKey of the element
SetGridLayer(UIElement, Int32)
Sets the layer index of the grid in which resides the element.
public static void SetGridLayer(this UIElement element, int index)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
System.Int32 | index | The 0-based layer index |
Remarks
Equivalent to set the LayerPropertyKey of the element
SetGridLayerSpan(UIElement, Int32)
Sets the number of layer spans that the element occupies in the grid.
public static void SetGridLayerSpan(this UIElement element, int index)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
System.Int32 | index | The number of layer spans occupied |
Remarks
Equivalent to set the LayerSpanPropertyKey of the element
SetGridRow(UIElement, Int32)
Sets the row index of the grid in which resides the element.
public static void SetGridRow(this UIElement element, int index)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
System.Int32 | index | The 0-based row index |
Remarks
Equivalent to set the RowPropertyKey of the element
SetGridRowSpan(UIElement, Int32)
Sets the number of row spans that the element occupies in the grid.
public static void SetGridRowSpan(this UIElement element, int index)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
System.Int32 | index | The number of row spans occupied |
Remarks
Equivalent to set the RowSpanPropertyKey of the element
SetPanelZIndex(UIElement, Int32)
Sets the Panel Z-index value for this element. The Panel Z-index value is used to determine which child of a same panel should be drawn on top.
public static void SetPanelZIndex(this UIElement element, int index)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element |
System.Int32 | index | The Panel Z-index value |
Remarks
Equivalent to set the ZIndexPropertyKey of the element