Class View

Definition

Namespace:
Tizen.NUI.BaseComponents
Assembly:
Tizen.NUI.dll
API Level:
3

View is the base class for all views.

C#
Copy
public class View : Container, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable, IResourcesProvider
Inheritance
System.Object
Tizen.NUI.Binding.BindableObject
Tizen.NUI.Binding.Element
View
Derived
Tizen.NUI.BaseComponents.CameraView
Tizen.NUI.BaseComponents.CameraView
Tizen.NUI.BaseComponents.CameraView
Tizen.NUI.BaseComponents.DirectRenderingGLView
Tizen.NUI.BaseComponents.GLView
Tizen.NUI.BaseComponents.GLView
Tizen.NUI.BaseComponents.VectorGraphics.CanvasView
Tizen.NUI.BaseComponents.VectorGraphics.CanvasView
Tizen.NUI.BaseComponents.VectorGraphics.CanvasView
Tizen.NUI.BaseComponents.WebView
Tizen.NUI.BaseComponents.WebView
Tizen.NUI.BaseComponents.WebView
Tizen.NUI.Camera
Tizen.NUI.CubeTransitionEffect
Tizen.NUI.Extension.RiveAnimationView
Tizen.NUI.Extension.RiveAnimationView
Tizen.NUI.Extension.RiveAnimationView
Tizen.NUI.GaussianBlurView
Tizen.NUI.Scene3D.Camera
Tizen.NUI.Scene3D.Camera
Tizen.NUI.Scene3D.Light
Tizen.NUI.Scene3D.Model
Tizen.NUI.Scene3D.Model
Tizen.NUI.Scene3D.ModelNode
Tizen.NUI.Scene3D.SceneView
Tizen.NUI.Scene3D.SceneView
Tizen.NUI.Wearable.WatchView
Implements
System.ComponentModel.INotifyPropertyChanged
System.IDisposable

Constructors

View Source

View()

Creates a new instance of a view.

Declaration
C#
Copy
public View()
API Level: 3

Properties

View Source

AlignSelf

The Child property of FlexContainer.
The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.

Declaration
C#
Copy
public int AlignSelf { get; set; }
Property Value
Type Description
System.Int32
API Level: 3
View Source

Background

The background of view.

Declaration
C#
Copy
public PropertyMap Background { get; set; }
Property Value
Type Description
PropertyMap
API Level: 3
View Source

BackgroundColor

The mutually exclusive with "backgroundImage" and "background" type Vector4.

Declaration
C#
Copy
public Color BackgroundColor { get; set; }
Property Value
Type Description
Color
Remarks

The property cascade chaining set is possible. For example, this (view.BackgroundColor.X = 0.1f;) is possible.

API Level: 3
View Source

BackgroundImage

The mutually exclusive with "backgroundColor" and "background" type Map.

Declaration
C#
Copy
public string BackgroundImage { get; set; }
Property Value
Type Description
System.String
API Level: 3
View Source

CellHorizontalAlignment

The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.

Declaration
C#
Copy
public HorizontalAlignmentType CellHorizontalAlignment { get; set; }
Property Value
Type Description
HorizontalAlignmentType
API Level: 3
View Source

CellIndex

The top-left cell this child occupies, if not set, the first available cell is used.

Declaration
C#
Copy
public Vector2 CellIndex { get; set; }
Property Value
Type Description
Vector2
Remarks

The property cascade chaining set is possible. For example, this (view.CellIndex.X = 0.1f;) is possible.

API Level: 3
View Source

CellVerticalAlignment

The vertical alignment of this child inside the cells, if not set, the default value is 'top'.

Declaration
C#
Copy
public VerticalAlignmentType CellVerticalAlignment { get; set; }
Property Value
Type Description
VerticalAlignmentType
API Level: 3
View Source

ChildCount

Get the number of children held by the view.

Declaration
C#
Copy
public uint ChildCount { get; }
Property Value
Type Description
System.UInt32
API Level: 3
View Source

ClippingMode

Gets or sets the clipping behavior (mode) of it's children.

Declaration
C#
Copy
public ClippingModeType ClippingMode { get; set; }
Property Value
Type Description
ClippingModeType
API Level: 3
View Source

ColumnSpan

The number of columns this child occupies, if not set, the default value is 1.

Declaration
C#
Copy
public float ColumnSpan { get; set; }
Property Value
Type Description
Single
API Level: 3
View Source

CurrentPosition

Retrieves the position of the view.
The coordinates are relative to the view's parent.

Declaration
C#
Copy
public Position CurrentPosition { get; }
Property Value
Type Description
Position
API Level: 3
View Source

CurrentSize

Retrieves the size of the view.
The coordinates are relative to the view's parent.

Declaration
C#
Copy
public Size2D CurrentSize { get; }
Property Value
Type Description
Size2D
API Level: 3
View Source

DownFocusableView

The down focusable view.
This will return null if not set.
This will also return null if the specified down focusable view is not on a window.

Declaration
C#
Copy
public View DownFocusableView { get; set; }
Property Value
Type Description
View
API Level: 3
View Source

DrawMode

Gets or sets the status of how the view and its children should be drawn.
Not all views are renderable, but DrawMode can be inherited from any view.
If an object is in a 3D layer, it will be depth-tested against other objects in the world, i.e., it may be obscured if other objects are in front.
If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.
Overlay views are drawn in a separate pass, after all non-overlay views within the layer.
For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.

Declaration
C#
Copy
public DrawModeType DrawMode { get; set; }
Property Value
Type Description
DrawModeType
API Level: 3
View Source

Flex

The Child property of FlexContainer.
The proportion of the free space in the container, the flex item will receive.
If all items in the container set this property, their sizes will be proportional to the specified flex factor.

Declaration
C#
Copy
public float Flex { get; set; }
Property Value
Type Description
Single
API Level: 3
View Source

FlexMargin

The Child property of FlexContainer.
The space around the flex item.

Declaration
C#
Copy
public Vector4 FlexMargin { get; set; }
Property Value
Type Description
Vector4
Remarks

The property cascade chaining set is possible. For example, this (view.FlexMargin.X = 0.1f;) is possible.

API Level: 3
View Source

Focusable

Whether the view should be focusable by keyboard navigation.

Declaration
C#
Copy
public bool Focusable { get; set; }
Property Value
Type Description
System.Boolean
API Level: 3
View Source

HeightForWidth

Gets or sets the status of whether the height size is dependent on the width size.

Declaration
C#
Copy
public bool HeightForWidth { get; set; }
Property Value
Type Description
System.Boolean
API Level: 3
View Source

HeightResizePolicy

Gets or sets the height resize policy to be used.

Declaration
C#
Copy
public ResizePolicyType HeightResizePolicy { get; set; }
Property Value
Type Description
ResizePolicyType
API Level: 3
View Source

HeightSpecification

The required policy for this dimension, LayoutParamPolicies enum or exact value.

Declaration
C#
Copy
public int HeightSpecification { get; set; }
Property Value
Type Description
System.Int32
API Level: 6
View Source

HierarchyDepth

Gets the depth in the hierarchy for the view.

Declaration
C#
Copy
public int HierarchyDepth { get; }
Property Value
Type Description
System.Int32
API Level: 3
View Source

ID

Gets the view's ID. Readonly

Declaration
C#
Copy
public uint ID { get; }
Property Value
Type Description
System.UInt32
API Level: 3
View Source

InheritLayoutDirection

Gets/Sets whether inherit parent's the layout Direction.

Declaration
C#
Copy
public bool InheritLayoutDirection { get; set; }
Property Value
Type Description
System.Boolean
API Level: 4
View Source

InheritOrientation

Gets or sets the status of whether a child view inherits it's parent's orientation.

Declaration
C#
Copy
public bool InheritOrientation { get; set; }
Property Value
Type Description
System.Boolean
API Level: 3
View Source

InheritPosition

Gets or sets whether a child view inherits it's parent's position.
Default is to inherit.
Switching this off means that using position sets the view's world position, i.e., translates from the world origin (0,0,0) to the pivot point of the view.

Declaration
C#
Copy
public bool InheritPosition { get; set; }
Property Value
Type Description
System.Boolean
API Level: 3
View Source

InheritScale

Gets or sets the status of whether a child view inherits it's parent's scale.

Declaration
C#
Copy
public bool InheritScale { get; set; }
Property Value
Type Description
System.Boolean
API Level: 3
View Source

IsOnWindow

Queries whether the view is connected to the stage.
When a view is connected, it will be directly or indirectly parented to the root view.

Declaration
C#
Copy
public bool IsOnWindow { get; }
Property Value
Type Description
System.Boolean
API Level: 3
View Source

Layout

Set the layout on this View. Replaces any existing Layout.

Declaration
C#
Copy
public LayoutItem Layout { get; set; }
Property Value
Type Description
LayoutItem
API Level: 6
View Source

LayoutDirection

Gets/Sets the layout Direction.

Declaration
C#
Copy
public ViewLayoutDirectionType LayoutDirection { get; set; }
Property Value
Type Description
ViewLayoutDirectionType
API Level: 4
View Source

LayoutTransition

Set a layout transitions for this View.

Declaration
C#
Copy
public LayoutTransition LayoutTransition { set; }
Property Value
Type Description
LayoutTransition
Remarks

Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.

API Level: 6
View Source

LayoutTransitions

Gets the List of transitions for this View.

Declaration
C#
Copy
public Dictionary<TransitionCondition, TransitionList> LayoutTransitions { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<TransitionCondition, TransitionList>
API Level: 6
View Source

LeaveRequired

Gets or sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.

Declaration
C#
Copy
public bool LeaveRequired { get; set; }
Property Value
Type Description
System.Boolean
API Level: 3
View Source

LeftFocusableView

The left focusable view.
This will return null if not set.
This will also return null if the specified left focusable view is not on a window.

Declaration
C#
Copy
public View LeftFocusableView { get; set; }
Property Value
Type Description
View
API Level: 3
View Source

Margin

Gets or sets the Margin for use in layout.

Declaration
C#
Copy
public Extents Margin { get; set; }
Property Value
Type Description
Extents
Remarks

Margin property is supported by Layout algorithms and containers. Please Set Layout if you want to use Margin property. The property cascade chaining set is possible. For example, this (view.Margin.X = 0.1f;) is possible.

API Level: 4
View Source

MaximumSize

Gets or sets the maximum size the view can be assigned in size negotiation.

Declaration
C#
Copy
public Size2D MaximumSize { get; set; }
Property Value
Type Description
Size2D
Remarks

The property cascade chaining set is possible. For example, this (view.MaximumSize.Width = 1;) is possible.

API Level: 3
View Source

MinimumSize

Gets or sets the minimum size the view can be assigned in size negotiation.

Declaration
C#
Copy
public Size2D MinimumSize { get; set; }
Property Value
Type Description
Size2D
Remarks

The property cascade chaining set is possible. For example, this (view.MinimumSize.Width = 1;) is possible.

API Level: 3
View Source

Name

Gets or sets the view's name.

Declaration
C#
Copy
public string Name { get; set; }
Property Value
Type Description
System.String
API Level: 3
View Source

NaturalSize

Returns the natural size of the view.

Declaration
C#
Copy
public Vector3 NaturalSize { get; }
Property Value
Type Description
Vector3
Remarks

Deriving classes stipulate the natural size and by default a view has a zero natural size.

API Level: 5
View Source

NaturalSize2D

Returns the natural size (Size2D) of the view.

Declaration
C#
Copy
public Size2D NaturalSize2D { get; }
Property Value
Type Description
Size2D
Remarks

Deriving classes stipulate the natural size and by default a view has a zero natural size.

API Level: 4
View Source

Opacity

Retrieves and sets the view's opacity.

Declaration
C#
Copy
public float Opacity { get; set; }
Property Value
Type Description
Single
Remarks

Animatable - This property can be animated using Animation class.

API Level: 3
View Source

Orientation

Gets or sets the orientation of the view.
The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.

Declaration
C#
Copy
public Rotation Orientation { get; set; }
Property Value
Type Description
Rotation
Remarks

This is an asynchronous method.

Animatable - This property can be animated using Animation class.

API Level: 3
View Source

Padding

Gets or sets the padding for use in layout.

Declaration
C#
Copy
public Extents Padding { get; set; }
Property Value
Type Description
Extents
Remarks

The property cascade chaining set is possible. For example, this (view.Padding.X = 0.1f;) is possible.

API Level: 5
View Source

ParentOrigin

Gets or sets the origin of a view within its parent's area.
This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent, and (1.0, 1.0, 0.5) is the bottom-right corner.
The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).
A view's position is the distance between this origin and the view's anchor-point.

Declaration
C#
Copy
public Position ParentOrigin { get; set; }
Property Value
Type Description
Position
API Level: 3
Precondition: The view has been initialized.
View Source

PivotPoint

Gets or sets the anchor-point of a view.
This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the view, and (1.0, 1.0, 0.5) is the bottom-right corner.
The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).
A view position is the distance between its parent-origin and this anchor-point.
A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.

The view has been initialized.
Declaration
C#
Copy
public Position PivotPoint { get; set; }
Property Value
Type Description
Position
Remarks

The property cascade chaining set is possible. For example, this (view.PivotPoint.X = 0.1f;) is possible.

API Level: 3
View Source

Position

Gets or sets the position of the view.
By default, sets the position vector between the parent origin and pivot point (default).
If the position inheritance is disabled, sets the world position.

Declaration
C#
Copy
public Position Position { get; set; }
Property Value
Type Description
Position
Remarks

Animatable - This property can be animated using Animation class.

The property cascade chaining set is possible. For example, this (view.Position.X = 1.0f;) is possible.

API Level: 3
View Source

Position2D

Sets the position of the view for X and Y.
By default, sets the position vector between the parent origin and the pivot point (default).
If the position inheritance is disabled, sets the world position.

Declaration
C#
Copy
public Position2D Position2D { get; set; }
Property Value
Type Description
Position2D
Remarks

This NUI object (Position2D) typed property can be configured by multiple cascade setting.
For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ).

API Level: 3
View Source

PositionUsesPivotPoint

Determines whether the pivot point should be used to determine the position of the view. This is true by default.

Declaration
C#
Copy
public bool PositionUsesPivotPoint { get; set; }
Property Value
Type Description
System.Boolean
Remarks

If false, then the top-left of the view is used for the position. Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.

API Level: 3
View Source

PositionX

Gets or sets the position X of the view.

Declaration
C#
Copy
public float PositionX { get; set; }
Property Value
Type Description
Single
Remarks

Animatable - This property can be animated using Animation class.

API Level: 3
View Source

PositionY

Gets or sets the position Y of the view.

Declaration
C#
Copy
public float PositionY { get; set; }
Property Value
Type Description
Single
Remarks

Animatable - This property can be animated using Animation class.

API Level: 3
View Source

PositionZ

Gets or sets the position Z of the view.

Declaration
C#
Copy
public float PositionZ { get; set; }
Property Value
Type Description
Single
Remarks

Animatable - This property can be animated using Animation class.

API Level: 3
View Source

RendererCount

Gets the number of renderers held by the view.

Declaration
C#
Copy
public uint RendererCount { get; }
Property Value
Type Description
System.UInt32
API Level: 3
View Source

RightFocusableView

The right focusable view.
This will return null if not set.
This will also return null if the specified right focusable view is not on a window.

Declaration
C#
Copy
public View RightFocusableView { get; set; }
Property Value
Type Description
View
API Level: 3
View Source

RowSpan

The number of rows this child occupies, if not set, the default value is 1.

Declaration
C#
Copy
public float RowSpan { get; set; }
Property Value
Type Description
Single
API Level: 3
View Source

Scale

Gets or sets the scale factor applied to the view.

Declaration
C#
Copy
public Vector3 Scale { get; set; }
Property Value
Type Description
Vector3
Remarks

Animatable - This property can be animated using Animation class.

The property cascade chaining set is possible. For example, this (view.Scale.X = 0.1f;) is possible.

API Level: 3
View Source

ScaleX

Gets or sets the scale X factor applied to the view.

Declaration
C#
Copy
public float ScaleX { get; set; }
Property Value
Type Description
Single
Remarks

Animatable - This property can be animated using Animation class.

API Level: 3
View Source

ScaleY

Gets or sets the scale Y factor applied to the view.

Declaration
C#
Copy
public float ScaleY { get; set; }
Property Value
Type Description
Single
Remarks

Animatable - This property can be animated using Animation class.

API Level: 3
View Source

ScaleZ

Gets or sets the scale Z factor applied to the view.

Declaration
C#
Copy
public float ScaleZ { get; set; }
Property Value
Type Description
Single
Remarks

Animatable - This property can be animated using Animation class.

API Level: 3
View Source

ScreenPosition

Retrieves the screen postion of the view.

Declaration
C#
Copy
public Vector2 ScreenPosition { get; }
Property Value
Type Description
Vector2
API Level: 3
View Source

Sensitive

Gets or sets the status of whether the view should emit touch or hover signals.

Declaration
C#
Copy
public bool Sensitive { get; set; }
Property Value
Type Description
System.Boolean
API Level: 3
View Source

SiblingOrder

Sets the sibling order of the view so the depth position can be defined within the same parent.

Declaration
C#
Copy
public int SiblingOrder { get; set; }
Property Value
Type Description
System.Int32
Remarks

Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0. Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order. The values set by this property will likely change.

API Level: 3
View Source

Size

Sets the size of a view for the width, the height and the depth.
Geometry can be scaled to fit within this area.
This does not interfere with the view's scale factor.
The views default depth is the minimum of width and height.

Declaration
C#
Copy
public Size Size { get; set; }
Property Value
Type Description
Size
Remarks

Animatable - This property can be animated using Animation class.

The property cascade chaining set is possible. For example, this (view.Size.Width = 1.0f;) is possible.

API Level: 5
View Source

Size2D

Sets the size of a view for the width and the height.
Geometry can be scaled to fit within this area.
This does not interfere with the view's scale factor.
The views default depth is the minimum of width and height.

Declaration
C#
Copy
public Size2D Size2D { get; set; }
Property Value
Type Description
Size2D
Remarks

This NUI object (Size2D) typed property can be configured by multiple cascade setting.
For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ).

API Level: 3
View Source

SizeHeight

Gets or sets the size height of the view.

Declaration
C#
Copy
public float SizeHeight { get; set; }
Property Value
Type Description
Single
Remarks

Animatable - This property can be animated using Animation class.

API Level: 3
View Source

SizeModeFactor

Gets or sets the relative to parent size factor of the view.
This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.
This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.

Declaration
C#
Copy
public Vector3 SizeModeFactor { get; set; }
Property Value
Type Description
Vector3
Remarks

The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.

API Level: 3
View Source

SizeScalePolicy

Gets or sets the policy to use when setting size with size negotiation.
Defaults to SizeScalePolicyType.UseSizeSet.

Declaration
C#
Copy
public SizeScalePolicyType SizeScalePolicy { get; set; }
Property Value
Type Description
SizeScalePolicyType
API Level: 3
View Source

SizeWidth

Gets or sets the size width of the view.

Declaration
C#
Copy
public float SizeWidth { get; set; }
Property Value
Type Description
Single
Remarks

Animatable - This property can be animated using Animation class.

API Level: 3
View Source

State

The current state of the view.

Declaration
C#
Copy
public View.States State { get; set; }
Property Value
Type Description
View.States
API Level: 3
View Source

StyleName

The StyleName, type string.

Declaration
C#
Copy
public string StyleName { get; set; }
Property Value
Type Description
System.String
API Level: 3
View Source

SubState

The current sub state of the view.

Declaration
C#
Copy
public View.States SubState { get; set; }
Property Value
Type Description
View.States
API Level: 3
View Source

Tooltip

Displays a tooltip

Declaration
C#
Copy
public PropertyMap Tooltip { get; set; }
Property Value
Type Description
PropertyMap
API Level: 3
View Source

TooltipText

Displays a tooltip as a text.

Declaration
C#
Copy
public string TooltipText { set; }
Property Value
Type Description
System.String
API Level: 3
View Source

UpFocusableView

The up focusable view.
This will return null if not set.
This will also return null if the specified up focusable view is not on a window.

Declaration
C#
Copy
public View UpFocusableView { get; set; }
Property Value
Type Description
View
API Level: 3
View Source

Visibility

Retrieves the visibility flag of the view.

Declaration
C#
Copy
public bool Visibility { get; }
Property Value
Type Description
System.Boolean
Remarks

If the view is not visible, then the view and its children will not be rendered. This is regardless of the individual visibility values of the children, i.e., the view will only be rendered if all of its parents have visibility set to true.

API Level: 3
View Source

Weight

The weight of the View, used to share available space in a layout with siblings.

Declaration
C#
Copy
public float Weight { get; set; }
Property Value
Type Description
Single
API Level: 6
View Source

WidthForHeight

Gets or sets the status of whether the width size is dependent on the height size.

Declaration
C#
Copy
public bool WidthForHeight { get; set; }
Property Value
Type Description
System.Boolean
API Level: 3
View Source

WidthResizePolicy

Gets or sets the width resize policy to be used.

Declaration
C#
Copy
public ResizePolicyType WidthResizePolicy { get; set; }
Property Value
Type Description
ResizePolicyType
API Level: 3
View Source

WidthSpecification

The required policy for this dimension, LayoutParamPolicies enum or exact value.

Declaration
C#
Copy
public int WidthSpecification { get; set; }
Property Value
Type Description
System.Int32
API Level: 6
View Source

WorldColor

Gets the view's world color.

Declaration
C#
Copy
public Vector4 WorldColor { get; }
Property Value
Type Description
Vector4
API Level: 3
View Source

WorldOrientation

Gets or sets the world orientation of the view.

Declaration
C#
Copy
public Rotation WorldOrientation { get; }
Property Value
Type Description
Rotation
API Level: 3
View Source

WorldPosition

Gets or sets the world position of the view.

Declaration
C#
Copy
public Vector3 WorldPosition { get; }
Property Value
Type Description
Vector3
API Level: 3
View Source

WorldScale

Gets the world scale of the view.

Declaration
C#
Copy
public Vector3 WorldScale { get; }
Property Value
Type Description
Vector3
API Level: 3

Methods

View Source

Add(View)

Adds a child view to this view.

Declaration
C#
Copy
public override void Add(View child)
Parameters
Type Name Description
View child
Overrides
See Also
API Level: 4
View Source

AddRenderer(Renderer)

Declaration
C#
Copy
public uint AddRenderer(Renderer renderer)
Parameters
Type Name Description
Renderer renderer
Returns
Type Description
System.UInt32
API Level: 3
View Source

AnimateBackgroundColor(Object, Int32, Int32, Nullable<AlphaFunction.BuiltinFunctions>, Object)

Creates an animation to animate the background color visual. If there is no background visual, creates one with transparent black as it's mixColor.

Declaration
C#
Copy
public Animation AnimateBackgroundColor(object destinationValue, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = default(AlphaFunction.BuiltinFunctions? ), object initialValue = null)
Parameters
Type Name Description
System.Object destinationValue
System.Int32 startTime
System.Int32 endTime
System.Nullable<AlphaFunction.BuiltinFunctions> alphaFunction
System.Object initialValue
Returns
Type Description
Animation
API Level: 3
View Source

AnimateColor(String, Object, Int32, Int32, Nullable<AlphaFunction.BuiltinFunctions>, Object)

Creates an animation to animate the mixColor of the named visual.

Declaration
C#
Copy
public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = default(AlphaFunction.BuiltinFunctions? ), object initialColor = null)
Parameters
Type Name Description
System.String targetVisual
System.Object destinationColor
System.Int32 startTime
System.Int32 endTime
System.Nullable<AlphaFunction.BuiltinFunctions> alphaFunction
System.Object initialColor
Returns
Type Description
Animation
API Level: 3
View Source

ClearBackground()

Clears the background.

Declaration
C#
Copy
public void ClearBackground()
API Level: 3
View Source

Dispose(DisposeTypes)

you can override it to clean-up your own resources.

Declaration
C#
Copy
protected override void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type

DisposeTypes

Overrides
API Level: 3
View Source

DoAction(Int32, Int32, PropertyValue)

Perform an action on a visual registered to this view.
Visuals will have actions. This API is used to perform one of these actions with the given attributes.

Declaration
C#
Copy
public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
Parameters
Type Name Description
System.Int32 propertyIndexOfVisual

The Property index of the visual.

System.Int32 propertyIndexOfActionId

The action to perform. See Visual to find the supported actions.

PropertyValue attributes

Optional attributes for the action.

API Level: 5
View Source

FindChildByName(String)

Search through this view's hierarchy for a view with the given name. The view itself is also considered in the search.

Declaration
C#
Copy
public View FindChildByName(string viewName)
Parameters
Type Name Description
System.String viewName

The name of the view to find.

Returns
Type Description
View

A handle to the view if found, or an empty handle if not.

API Level: 3
Precondition: The view has been initialized.
View Source

GetChildAt(UInt32)

Retrieves a child view by index.

Declaration
C#
Copy
public override View GetChildAt(uint index)
Parameters
Type Name Description
System.UInt32 index
Returns
Type Description
View
Overrides
See Also
GetChildAt(System.UInt32)
API Level: 4
View Source

GetChildCount()

Retrieves the number of children held by the view.

Declaration
C#
Copy
public override uint GetChildCount()
Returns
Type Description
System.UInt32
Overrides
See Also
API Level: 4
View Source

GetHeightForWidth(Single)

Calculates the height of the view given a width.
The natural size is used for default calculation.
Size 0 is treated as aspect ratio 1:1.

Declaration
C#
Copy
public float GetHeightForWidth(float width)
Parameters
Type Name Description
Single width

The width to use.

Returns
Type Description
Single

The height based on the width.

API Level: 3
View Source

GetLayer()

Gets the parent layer of this view.If a view has no parent, this method does not do anything.

Declaration
C#
Copy
public Layer GetLayer()
Returns
Type Description
Layer

The parent layer of view

API Level: 5
Precondition: The view has been initialized.
View Source

GetPadding(PaddingType)

Return the value of padding for the view.

Declaration
C#
Copy
public void GetPadding(PaddingType paddingOut)
Parameters
Type Name Description
PaddingType paddingOut

the value of padding for the view

API Level: 3
View Source

GetParent()

Gets the views parent.

Declaration
C#
Copy
public override Container GetParent()
Returns
Type Description
Container
Overrides
See Also
API Level: 4
View Source

GetRelayoutSize(DimensionType)

Return the amount of size allocated for relayout.

Declaration
C#
Copy
public float GetRelayoutSize(DimensionType dimension)
Parameters
Type Name Description
DimensionType dimension

The dimension to retrieve.

Returns
Type Description
Single

Return the size.

API Level: 3
View Source

GetRendererAt(UInt32)

Declaration
C#
Copy
public Renderer GetRendererAt(uint index)
Parameters
Type Name Description
System.UInt32 index
Returns
Type Description
Renderer
API Level: 3
View Source

GetStyleName()

Retrieves the name of the style to be applied to the view (if any).

Declaration
C#
Copy
public string GetStyleName()
Returns
Type Description
System.String

A string matching a style, or an empty string.

API Level: 3
View Source

GetWidthForHeight(Single)

Calculates the width of the view given a height.
The natural size is used for default calculation.
Size 0 is treated as aspect ratio 1:1.

Declaration
C#
Copy
public float GetWidthForHeight(float height)
Parameters
Type Name Description
Single height

The height to use.

Returns
Type Description
Single

The width based on the height.

API Level: 3
View Source

HasFocus()

Queries whether the view has a focus.

Declaration
C#
Copy
public bool HasFocus()
Returns
Type Description
System.Boolean

True if this view has a focus.

API Level: 3
View Source

Hide()

Hides the view.

Declaration
C#
Copy
public void Hide()
Remarks

This is an asynchronous method. If the view is hidden, then the view and its children will not be rendered. This is regardless of the individual visibility of the children, i.e., the view will only be rendered if all of its parents are shown.

API Level: 3
View Source

IsResourceReady()

Queries if all resources required by a view are loaded and ready.

Declaration
C#
Copy
public bool IsResourceReady()
Returns
Type Description
System.Boolean
Remarks

Most resources are only loaded when the control is placed on the stage.

API Level: 3
View Source

LowerToBottom()

Lowers the view to the bottom of all views.

Declaration
C#
Copy
public void LowerToBottom()
Remarks

The sibling order of views within the parent will be updated automatically. Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.

API Level: 3
View Source

RaiseToTop()

Raises the view above all other views.

Declaration
C#
Copy
public void RaiseToTop()
Remarks

Sibling order of views within the parent will be updated automatically. Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.

API Level: 3
View Source

Remove(View)

Removes a child view from this View. If the view was not a child of this view, this is a no-op.

Declaration
C#
Copy
public override void Remove(View child)
Parameters
Type Name Description
View child
Overrides
See Also
API Level: 4
View Source

RemoveRenderer(UInt32)

Declaration
C#
Copy
public void RemoveRenderer(uint index)
Parameters
Type Name Description
System.UInt32 index
API Level: 3
View Source

RemoveRenderer(Renderer)

Declaration
C#
Copy
public void RemoveRenderer(Renderer renderer)
Parameters
Type Name Description
Renderer renderer
API Level: 3
View Source

ScreenToLocal(out Single, out Single, Single, Single)

Converts screen coordinates into the view's coordinate system using the default camera.

Declaration
C#
Copy
public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
Parameters
Type Name Description
Single localX

On return, the X-coordinate relative to the view.

Single localY

On return, the Y-coordinate relative to the view.

Single screenX

The screen X-coordinate.

Single screenY

The screen Y-coordinate.

Returns
Type Description
System.Boolean

True if the conversion succeeded.

Remarks

The view coordinates are relative to the top-left(0.0, 0.0, 0.5).

API Level: 3
Precondition: The view has been initialized.
View Source

SetPadding(PaddingType)

Set the padding for the view.

Declaration
C#
Copy
public void SetPadding(PaddingType padding)
Parameters
Type Name Description
PaddingType padding

Padding for the view.

API Level: 3
View Source

SetSizeModeFactor(Vector3)

Sets the relative to parent size factor of the view.
This factor is only used when ResizePolicy is set to either: ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.
This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.

Declaration
C#
Copy
public void SetSizeModeFactor(Vector3 factor)
Parameters
Type Name Description
Vector3 factor

A Vector3 representing the relative factor to be applied to each axis.

API Level: 3
Precondition: The view has been initialized.
View Source

SetStyleName(String)

Sets the name of the style to be applied to the view.

Declaration
C#
Copy
public void SetStyleName(string styleName)
Parameters
Type Name Description
System.String styleName

A string matching a style described in a stylesheet.

API Level: 3
View Source

Show()

Shows the view.

Declaration
C#
Copy
public void Show()
Remarks

This is an asynchronous method.

API Level: 3
View Source

Unparent()

Removes a view from its parent view or layer. If a view has no parent, this method does nothing.

Declaration
C#
Copy
public void Unparent()
API Level: 4
Precondition: The (child) view has been initialized.

Events

View Source

AddedToWindow

An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.
The OnWindow signal is emitted after the view has been connected to the window.

Declaration
C#
Copy
public event EventHandler AddedToWindow
Event Type
Type Description
System.EventHandler
API Level: 3
View Source

ChildAdded

Event when a child is added.

Declaration
C#
Copy
public event EventHandler<View.ChildAddedEventArgs> ChildAdded
Event Type
Type Description
System.EventHandler<View.ChildAddedEventArgs>
API Level: 5
View Source

ChildRemoved

Event when a child is removed.

Declaration
C#
Copy
public event EventHandler<View.ChildRemovedEventArgs> ChildRemoved
Event Type
Type Description
System.EventHandler<View.ChildRemovedEventArgs>
API Level: 5
View Source

FocusGained

An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.
The KeyInputFocusGained signal is emitted when the control gets the key input focus.

Declaration
C#
Copy
public event EventHandler FocusGained
Event Type
Type Description
System.EventHandler
API Level: 3
View Source

FocusLost

An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.
The KeyInputFocusLost signal is emitted when the control loses the key input focus.

Declaration
C#
Copy
public event EventHandler FocusLost
Event Type
Type Description
System.EventHandler
API Level: 3
View Source

HoverEvent

An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.
The hovered signal is emitted when the hover input is received.

Declaration
C#
Copy
public event EventHandlerWithReturnType<object, View.HoverEventArgs, bool> HoverEvent
Event Type
Type Description
EventHandlerWithReturnType<System.Object, View.HoverEventArgs, System.Boolean>
API Level: 3
View Source

KeyEvent

An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.
The KeyPressed signal is emitted when the key event is received.

Declaration
C#
Copy
public event EventHandlerWithReturnType<object, View.KeyEventArgs, bool> KeyEvent
Event Type
Type Description
EventHandlerWithReturnType<System.Object, View.KeyEventArgs, System.Boolean>
API Level: 3
View Source

LayoutDirectionChanged

Event for layout direction change which can be used to subscribe/unsubscribe the event handler.
This signal is emitted when the layout direction property of this or a parent view is changed.

Declaration
C#
Copy
public event EventHandler<View.LayoutDirectionChangedEventArgs> LayoutDirectionChanged
Event Type
Type Description
System.EventHandler<View.LayoutDirectionChangedEventArgs>
API Level: 4
View Source

Relayout

An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.
The OnRelayout signal is emitted after the size has been set on the view during relayout.

Declaration
C#
Copy
public event EventHandler Relayout
Event Type
Type Description
System.EventHandler
API Level: 3
View Source

RemovedFromWindow

An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.
OffWindow signal is emitted after the view has been disconnected from the window.

Declaration
C#
Copy
public event EventHandler RemovedFromWindow
Event Type
Type Description
System.EventHandler
API Level: 3
View Source

ResourcesLoaded

An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.
This signal is emitted after all resources required by a view are loaded and ready.

Declaration
C#
Copy
public event EventHandler ResourcesLoaded
Event Type
Type Description
System.EventHandler
API Level: 3
View Source

TouchEvent

An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.
The touched signal is emitted when the touch input is received.

Declaration
C#
Copy
public event EventHandlerWithReturnType<object, View.TouchEventArgs, bool> TouchEvent
Event Type
Type Description
EventHandlerWithReturnType<System.Object, View.TouchEventArgs, System.Boolean>
API Level: 3
View Source

VisibilityChanged

An event for visibility change which can be used to subscribe or unsubscribe the event handler.
This signal is emitted when the visible property of this or a parent view is changed.

Declaration
C#
Copy
public event EventHandler<View.VisibilityChangedEventArgs> VisibilityChanged
Event Type
Type Description
System.EventHandler<View.VisibilityChangedEventArgs>
API Level: 3
View Source

WheelEvent

An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.
The WheelMoved signal is emitted when the wheel event is received.

Declaration
C#
Copy
public event EventHandlerWithReturnType<object, View.WheelEventArgs, bool> WheelEvent
Event Type
Type Description
EventHandlerWithReturnType<System.Object, View.WheelEventArgs, System.Boolean>
API Level: 3

Implements

System.ComponentModel.INotifyPropertyChanged
System.IDisposable