Class View
Definition
- Namespace:
- Tizen.NUI.BaseComponents
- Assembly:
- Tizen.NUI.dll
- API Level:
- 3
View is the base class for all views.
C#Copypublic class View : Container, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable, IResourcesProvider
- Inheritance
- Derived
-
Tizen.NUI.BaseComponents.DirectRenderingGLViewTizen.NUI.CameraTizen.NUI.CubeTransitionEffectTizen.NUI.GaussianBlurViewTizen.NUI.Scene3D.LightTizen.NUI.Scene3D.ModelNodeTizen.NUI.Wearable.WatchView
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Constructors
Declaration
C#Copypublic View()
API Level: 3
Properties
AlignSelf
The Child property of FlexContainer.
The alignment of the flex item along the cross axis, which, if set, overrides the default alignment for all items in the container.
Declaration
C#Copy[Obsolete("Deprecated in API8, will be removed in API10.")] public int AlignSelf { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: 3
Declaration
C#Copypublic PropertyMap Background { get; set; }
Property Value
Type | Description |
---|---|
PropertyMap |
API Level: 3
BackgroundColor
The mutually exclusive with "backgroundImage" and "background" type Vector4.
Declaration
C#Copypublic Color BackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Remarks
The property cascade chaining set is not recommended.
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "BackgroundColor", new Color(r, g, b, a));
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.BackgroundColor = new Color(0.5f, 0.1f, 0, 1);
This way to set the property is prohibited
Copyview.BackgroundColor.R = 0.5f; //This does not guarantee a proper operation
API Level: 3
BackgroundImage
The mutually exclusive with "backgroundColor" and "background" type Map.
Declaration
C#Copypublic string BackgroundImage { get; set; }
Property Value
Type | Description |
---|---|
System.String |
API Level: 3
Declaration
C#Copypublic Color BorderlineColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "BorderlineColor", new Color(r, g, b, a));
API Level: 9
BorderlineOffset
The Relative offset for the borderline of the View. Recommended range : [-1.0f to 1.0f]. If -1.0f, draw borderline inside of the View. If 1.0f, draw borderline outside of the View. If 0.0f, draw borderline half inside and half outside. It is 0.0f by default.
Declaration
C#Copypublic float BorderlineOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "BorderlineOffset", -1.0f);
API Level: 9
Declaration
C#Copypublic float BorderlineWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "BorderlineWidth", 100.0f);
Note that, an image background may not have borderline if it uses the Border property.
API Level: 9
Declaration
C#Copypublic Shadow BoxShadow { get; set; }
Property Value
Type | Description |
---|---|
Shadow |
Remarks
The mutually exclusive with "ImageShadow".
API Level: 9
CellHorizontalAlignment
The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
Declaration
C#Copypublic HorizontalAlignmentType CellHorizontalAlignment { get; set; }
Property Value
Type | Description |
---|---|
HorizontalAlignmentType |
Remarks
API Level: 3
CellIndex
The top-left cell this child occupies, if not set, the first available cell is used.
Declaration
C#Copypublic Vector2 CellIndex { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Remarks
The property cascade chaining set is not recommended. Also, this property is for TableView class. Please use the property for the child position of TableView.
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.CellIndex = new Vector2(1, 3);
This way to set the property is prohibited
Copyview.CellIndex.X = 1; //This does not guarantee a proper operation
API Level: 3
CellVerticalAlignment
The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
Declaration
C#Copypublic VerticalAlignmentType CellVerticalAlignment { get; set; }
Property Value
Type | Description |
---|---|
VerticalAlignmentType |
Remarks
API Level: 3
Declaration
C#Copypublic uint ChildCount { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
API Level: 3
Declaration
C#Copypublic ClippingModeType ClippingMode { get; set; }
Property Value
Type | Description |
---|---|
ClippingModeType |
API Level: 3
ColumnSpan
The number of columns this child occupies, if not set, the default value is 1.
Declaration
C#Copypublic float ColumnSpan { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
API Level: 3
CornerRadius
The radius for the rounded corners of the View. This will rounds background and shadow edges. The values in Vector4 are used in clockwise order from top-left to bottom-left : Vector4(top-left-corner, top-right-corner, bottom-right-corner, bottom-left-corner). Each radius will clamp internally to the half of smaller of the view's width or height. Note that, an image background (or shadow) may not have rounded corners if it uses a Border property.
Declaration
C#Copypublic Vector4 CornerRadius { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "CornerRadius", new Vector4(10, 10, 10, 10));
API Level: 9
CornerRadiusPolicy
Whether the CornerRadius property value is relative (percentage [0.0f to 0.5f] of the view size) or absolute (in world units). It is absolute by default. When the policy is relative, the corner radius is relative to the smaller of the view's width and height.
Declaration
C#Copypublic VisualTransformPolicyType CornerRadiusPolicy { get; set; }
Property Value
Type | Description |
---|---|
VisualTransformPolicyType |
API Level: 9
CurrentPosition
Retrieves the position of the view. The coordinates are relative to the view's parent.
Declaration
C#Copypublic Position CurrentPosition { get; }
Property Value
Type | Description |
---|---|
Position |
Remarks
The Size, Position, Tizen.NUI.BaseComponents.View.Color, and Scale properties are set in the main thread. Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation). However, CurrentSize, CurrentPosition, Tizen.NUI.BaseComponents.View.CurrentColor, and Tizen.NUI.BaseComponents.View.CurrentScale properties are updated in real time, and users can get the current actual values through them.
API Level: 3
CurrentSize
Retrieves the size of the view. The coordinates are relative to the view's parent.
Declaration
C#Copypublic Size2D CurrentSize { get; }
Property Value
Type | Description |
---|---|
Size2D |
Remarks
The Size, Position, Tizen.NUI.BaseComponents.View.Color, and Scale properties are set in the main thread. Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation). However, CurrentSize, CurrentPosition, Tizen.NUI.BaseComponents.View.CurrentColor, and Tizen.NUI.BaseComponents.View.CurrentScale properties are updated in real time, and users can get the current actual values through them.
API Level: 3
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#Copypublic View DownFocusableView { get; set; }
Property Value
Type | Description |
---|---|
View |
API Level: 3
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#Copypublic DrawModeType DrawMode { get; set; }
Property Value
Type | Description |
---|---|
DrawModeType |
API Level: 3
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[Obsolete("Deprecated in API8, will be removed in API10.")] public float Flex { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
API Level: 3
Declaration
C#Copy[Obsolete("Deprecated in API8, will be removed in API10.")] 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
Declaration
C#Copypublic bool Focusable { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
HeightForWidth
Gets or sets the status of whether the height size is dependent on the width size.
Declaration
C#Copypublic bool HeightForWidth { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
Declaration
C#Copypublic ResizePolicyType HeightResizePolicy { get; set; }
Property Value
Type | Description |
---|---|
ResizePolicyType |
API Level: 3
HeightSpecification
The required policy for this dimension, LayoutParamPolicies values or exact value.
Declaration
C#Copypublic int HeightSpecification { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Examples
Copy// matchParentView matches its size to its parent size. matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent; matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent; // wrapContentView wraps its children with their desired size. wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent; wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent; // exactSizeView shows itself with an exact size. exactSizeView.WidthSpecification = 100; exactSizeView.HeightSpecification = 100;
API Level: 6
Declaration
C#Copypublic int HierarchyDepth { get; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: 3
Declaration
C#Copypublic uint ID { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
API Level: 3
Declaration
C#Copypublic bool InheritLayoutDirection { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 4
InheritOrientation
Gets or sets the status of whether a child view inherits it's parent's orientation.
Declaration
C#Copypublic bool InheritOrientation { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
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#Copypublic bool InheritPosition { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
InheritScale
Gets or sets the status of whether a child view inherits it's parent's scale.
Declaration
C#Copypublic bool InheritScale { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
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#Copypublic bool IsOnWindow { get; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
Declaration
C#Copypublic LayoutItem Layout { get; set; }
Property Value
Type | Description |
---|---|
LayoutItem |
Remarks
If this Layout is set as null explicitly, it means this View itself and it's child Views will not use Layout anymore.
API Level: 6
Declaration
C#Copypublic ViewLayoutDirectionType LayoutDirection { get; set; }
Property Value
Type | Description |
---|---|
ViewLayoutDirectionType |
API Level: 4
Declaration
C#Copypublic LayoutTransition LayoutTransition { get; set; }
Property Value
Type | Description |
---|---|
LayoutTransition |
Remarks
Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when value is null. |
API Level: 6
Declaration
C#Copypublic Dictionary<TransitionCondition, TransitionList> LayoutTransitions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<TransitionCondition, TransitionList> |
API Level: 6
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#Copypublic bool LeaveRequired { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
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#Copypublic View LeftFocusableView { get; set; }
Property Value
Type | Description |
---|---|
View |
API Level: 3
Declaration
C#Copypublic 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 not recommended.
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.Margin = new Extents(10, 5, 15, 20);
This way to set the property is prohibited
Copyview.Margin.Top = 15; //This does not guarantee a proper operation
API Level: 4
Declaration
C#Copypublic Size2D MaximumSize { get; set; }
Property Value
Type | Description |
---|---|
Size2D |
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.MaximumSize = new Size2D(100, 200);
This way to set the property is prohibited
Copyview.MaximumSize.Height = 200; //This does not guarantee a proper operation
API Level: 3
Declaration
C#Copypublic Size2D MinimumSize { get; set; }
Property Value
Type | Description |
---|---|
Size2D |
Remarks
The property cascade chaining set is not recommended.
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.MinimumSize = new Size2D(100, 200);
This way to set the property is prohibited
Copyview.MinimumSize.Width = 100; //This does not guarantee a proper operation
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when value is null. |
API Level: 3
Declaration
C#Copypublic string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
API Level: 3
Declaration
C#Copypublic 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
Declaration
C#Copypublic 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
Declaration
C#Copypublic float Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "Opacity", 0.5f);
API Level: 3
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#Copypublic Rotation Orientation { get; set; }
Property Value
Type | Description |
---|---|
Rotation |
Remarks
This is an asynchronous method.
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "Orientation", new Rotation(new Radian((float)Math.PI), Vector3.XAxis));
API Level: 3
Declaration
C#Copypublic Extents Padding { get; set; }
Property Value
Type | Description |
---|---|
Extents |
Remarks
The property cascade chaining set is not recommended.
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.Padding = new Extents(5, 5, 5, 5);
This way to set the property is prohibited
Copyview.Padding.Start = 5; //This does not guarantee a proper operation
API Level: 5
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#Copypublic Position ParentOrigin { get; set; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
Precondition: The view has been initialized.
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#Copypublic Position PivotPoint { get; set; }
Property Value
Type | Description |
---|---|
Position |
Remarks
The property cascade chaining set is not recommended.
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.PivotPoint = PivotPoint.Center;
This way to set the property is prohibited
Copyview.PivotPoint.X = 0.5f; //This does not guarantee a proper operation
API Level: 3
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#Copypublic Position Position { get; set; }
Property Value
Type | Description |
---|---|
Position |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "Position", new Position(50, 0));
The property cascade chaining set is not recommended.
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.Position = new Position(100, 200.5f, 0);
This way to set the property is prohibited
Copyview.Position.Y = 200.5f; //This does not guarantee a proper operation
API Level: 3
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#Copypublic Position2D Position2D { get; set; }
Property Value
Type | Description |
---|---|
Position2D |
Remarks
The property cascade chaining set is not recommended.
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.Position2D = new Position2D(100, 200);
This way to set the property is prohibited
Copyview.Position2D.X = 100; //This does not guarantee a proper operation
API Level: 3
PositionUsesPivotPoint
Determines whether the pivot point should be used to determine the position of the view. This is false by default.
Declaration
C#Copypublic bool PositionUsesPivotPoint { get; set; }
Property Value
Type | Description |
---|---|
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
Declaration
C#Copypublic float PositionX { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "PositionX", 50.0f);
API Level: 3
Declaration
C#Copypublic float PositionY { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "PositionY", 50.0f);
API Level: 3
Declaration
C#Copypublic float PositionZ { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "PositionZ", 50.0f);
API Level: 3
Declaration
C#Copypublic uint RendererCount { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
API Level: 3
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#Copypublic View RightFocusableView { get; set; }
Property Value
Type | Description |
---|---|
View |
API Level: 3
Declaration
C#Copypublic float RowSpan { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
API Level: 3
Declaration
C#Copypublic Vector3 Scale { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "Scale", new Vector3(1.5f, 1.5f, 1.0f));
The property cascade chaining set is not recommended.
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.Scale = new Vector3(1.5f, 2.0f, 1.0f);
This way to set the property is prohibited
Copyview.Scale.Width = 1.5f; //This does not guarantee a proper operation
API Level: 3
Declaration
C#Copypublic float ScaleX { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "ScaleX", 1.5f);
API Level: 3
Declaration
C#Copypublic float ScaleY { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "ScaleY", 1.5f);
API Level: 3
Declaration
C#Copypublic float ScaleZ { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "ScaleZ", 1.5f);
API Level: 3
Declaration
C#Copypublic Vector2 ScreenPosition { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
Sensitive
Gets or sets the status of whether the view should emit touch or hover signals. If a View is made insensitive, then the View and its children are not hittable.
Declaration
C#Copypublic bool Sensitive { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
SiblingOrder
Sets the sibling order of the view so the depth position can be defined within the same parent.
Declaration
C#Copypublic int SiblingOrder { get; set; }
Property Value
Type | Description |
---|---|
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
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#Copypublic Size Size { get; set; }
Property Value
Type | Description |
---|---|
Size |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "Size", new Size(100, 100));
The property cascade chaining set is not recommended.
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.Size = new Size(100.5f, 200, 0);
This way to set the property is prohibited
Copyview.Size.Width = 100.5f; //This does not guarantee a proper operation
API Level: 5
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#Copypublic Size2D Size2D { get; set; }
Property Value
Type | Description |
---|---|
Size2D |
Remarks
The property cascade chaining set is not recommended.
Examples
This way is recommended for setting the property
Copyvar view = new View(); view.Size2D = new Size2D(100, 200);
This way to set the property is prohibited
Copyview.Size2D.Width = 100; //This does not guarantee a proper operation
API Level: 3
Declaration
C#Copypublic float SizeHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "SizeHeight", 500.0f);
API Level: 3
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#Copypublic Vector3 SizeModeFactor { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
The property cascade chaining set is not recommended.
Examples
This way is recommended for setting the property
Copyvar text = new TextField(); text.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f);
This way to set the property is prohibited
Copytext.SizeModeFactor.Width = 1.0f; //This does not guarantee a proper operation
API Level: 3
SizeScalePolicy
Gets or sets the policy to use when setting size with size negotiation.
Defaults to SizeScalePolicyType.UseSizeSet.
Declaration
C#Copypublic SizeScalePolicyType SizeScalePolicy { get; set; }
Property Value
Type | Description |
---|---|
SizeScalePolicyType |
API Level: 3
Declaration
C#Copypublic float SizeWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "SizeWidth", 500.0f);
API Level: 3
Declaration
C#Copypublic View.States State { get; set; }
Property Value
Type | Description |
---|---|
View.States |
API Level: 3
StyleName
The StyleName, type string. The value indicates DALi style name defined in json theme file.
Declaration
C#Copypublic string StyleName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
API Level: 3
Declaration
C#Copypublic View.States SubState { get; set; }
Property Value
Type | Description |
---|---|
View.States |
API Level: 3
ThemeChangeSensitive
If the value is true, the View will change its style as the theme changes. The default value is false in normal case but it can be true when the NUIApplication is created with Tizen.NUI.NUIApplication.ThemeOptions.ThemeChangeSensitive.
Declaration
C#Copypublic bool ThemeChangeSensitive { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 9
Declaration
C#Copypublic PropertyMap Tooltip { get; set; }
Property Value
Type | Description |
---|---|
PropertyMap |
API Level: 3
Declaration
C#Copypublic string TooltipText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
API Level: 3
TransitionOptions
Set or Get TransitionOptions for the page transition. This property is used to define how this view will be transitioned during Page switching.
Declaration
C#Copypublic TransitionOptions TransitionOptions { get; set; }
Property Value
Type | Description |
---|---|
TransitionOptions |
API Level: 9
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#Copypublic View UpFocusableView { get; set; }
Property Value
Type | Description |
---|---|
View |
API Level: 3
Declaration
C#Copypublic bool Visibility { get; }
Property Value
Type | Description |
---|---|
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.
Animatable - This property can be animated using Animation
class.
Copyanimation.AnimateTo(view, "Visibility", false);
API Level: 3
Declaration
C#Copypublic float Weight { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
API Level: 6
WidthForHeight
Gets or sets the status of whether the width size is dependent on the height size.
Declaration
C#Copypublic bool WidthForHeight { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
Declaration
C#Copypublic ResizePolicyType WidthResizePolicy { get; set; }
Property Value
Type | Description |
---|---|
ResizePolicyType |
API Level: 3
WidthSpecification
The required policy for this dimension, LayoutParamPolicies values or exact value.
Declaration
C#Copypublic int WidthSpecification { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Examples
Copy// matchParentView matches its size to its parent size. matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent; matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent; // wrapContentView wraps its children with their desired size. wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent; wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent; // exactSizeView shows itself with an exact size. exactSizeView.WidthSpecification = 100; exactSizeView.HeightSpecification = 100;
API Level: 6
Declaration
C#Copypublic Vector4 WorldColor { get; }
Property Value
Type | Description |
---|---|
Vector4 |
API Level: 3
Declaration
C#Copypublic Rotation WorldOrientation { get; }
Property Value
Type | Description |
---|---|
Rotation |
API Level: 3
Declaration
C#Copypublic Vector3 WorldPosition { get; }
Property Value
Type | Description |
---|---|
Vector3 |
API Level: 3
Declaration
C#Copypublic Vector3 WorldScale { get; }
Property Value
Type | Description |
---|---|
Vector3 |
API Level: 3
Methods
Declaration
C#Copypublic override void Add(View child)
Parameters
Type | Name | Description |
---|---|---|
View | child |
Overrides
API Level: 4
Declaration
C#Copypublic uint AddRenderer(Renderer renderer)
Parameters
Type | Name | Description |
---|---|---|
Renderer | renderer |
Returns
Type | Description |
---|---|
System.UInt32 |
API Level: 3
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#Copypublic Animation AnimateBackgroundColor(object destinationValue, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = default(AlphaFunction.BuiltinFunctions? ), object initialValue = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | destinationValue | |
Int32 | startTime | |
Int32 | endTime | |
System.Nullable<AlphaFunction.BuiltinFunctions> | alphaFunction | |
System.Object | initialValue |
Returns
Type | Description |
---|---|
Animation |
API Level: 3
AnimateColor(String, Object, Int32, Int32, Nullable<AlphaFunction.BuiltinFunctions>, Object)
Creates an animation to animate the mixColor of the named visual.
Declaration
C#Copypublic 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 | |
Int32 | startTime | |
Int32 | endTime | |
System.Nullable<AlphaFunction.BuiltinFunctions> | alphaFunction | |
System.Object | initialColor |
Returns
Type | Description |
---|---|
Animation |
API Level: 3
ApplyStyle(ViewStyle)
Apply style instance to the view. Basically it sets the bindable property to the value of the bindable property with same name in the style.
Declaration
C#Copypublic virtual void ApplyStyle(ViewStyle viewStyle)
Parameters
Type | Name | Description |
---|---|---|
ViewStyle | viewStyle |
API Level: 9
Declaration
C#Copypublic void ClearBackground()
API Level: 3
Declaration
C#Copyprotected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type | DisposeTypes |
Overrides
API Level: 3
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#Copypublic void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
Parameters
Type | Name | Description |
---|---|---|
Int32 | propertyIndexOfVisual | The Property index of the visual. |
Int32 | propertyIndexOfActionId | The action to perform. See Visual to find the supported actions. |
PropertyValue | attributes | Optional attributes for the action. |
API Level: 5
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#Copypublic 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.
FindDescendantByID(UInt32)
Search through this View's hierarchy for a View with the given unique ID.
Declaration
C#Copypublic View FindDescendantByID(uint id)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | id | The ID of the View to find. |
Returns
Type | Description |
---|---|
View | A handle to the View if found, or an empty handle if not. |
API Level: 9
Declaration
C#Copypublic override View GetChildAt(uint index)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | index |
Returns
Type | Description |
---|---|
View |
Overrides
See Also
API Level: 4
Declaration
C#Copy[Obsolete("This has been deprecated in API9 and will be removed in API11. Use ChildCount property instead.")] public override uint GetChildCount()
Returns
Type | Description |
---|---|
System.UInt32 |
Overrides
See Also
API Level: 4
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#Copypublic float GetHeightForWidth(float width)
Parameters
Type | Name | Description |
---|---|---|
System.Single | width | The width to use. |
Returns
Type | Description |
---|---|
System.Single | The height based on the width. |
API Level: 3
GetLayer()
Gets the parent layer of this view.If a view has no parent, this method does not do anything.
Declaration
C#Copypublic Layer GetLayer()
Returns
Type | Description |
---|---|
Layer | The parent layer of view |
API Level: 5
Precondition: The view has been initialized.
Declaration
C#Copy[Obsolete("This has been deprecated in API9 and will be removed in API11. Use Padding property instead.")] public void GetPadding(PaddingType paddingOut)
Parameters
Type | Name | Description |
---|---|---|
PaddingType | paddingOut | the value of padding for the view |
API Level: 3
Declaration
C#Copypublic override Container GetParent()
Returns
Type | Description |
---|---|
Container |
Overrides
See Also
API Level: 4
Declaration
C#Copypublic float GetRelayoutSize(DimensionType dimension)
Parameters
Type | Name | Description |
---|---|---|
DimensionType | dimension | The dimension to retrieve. |
Returns
Type | Description |
---|---|
System.Single | Return the size. |
API Level: 3
Declaration
C#Copypublic Renderer GetRendererAt(uint index)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | index |
Returns
Type | Description |
---|---|
Renderer |
API Level: 3
Declaration
C#Copy[Obsolete("This has been deprecated in API9 and will be removed in API11. Use StyleName property instead.")] public string GetStyleName()
Returns
Type | Description |
---|---|
System.String | A string matching a style, or an empty string. |
API Level: 3
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#Copypublic float GetWidthForHeight(float height)
Parameters
Type | Name | Description |
---|---|---|
System.Single | height | The height to use. |
Returns
Type | Description |
---|---|
System.Single | The width based on the height. |
API Level: 3
Declaration
C#Copypublic bool HasFocus()
Returns
Type | Description |
---|---|
Boolean | True if this view has a focus. |
API Level: 3
Declaration
C#Copypublic 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
Declaration
C#Copypublic bool IsResourceReady()
Returns
Type | Description |
---|---|
Boolean |
Remarks
Most resources are only loaded when the control is placed on the stage.
API Level: 3
Declaration
C#Copypublic void Lower()
API Level: 9
Declaration
C#Copypublic void LowerBelow(View target)
Parameters
Type | Name | Description |
---|---|---|
View | target | Will be lowered below this view. |
Remarks
The sibling order of views within the parent will be updated automatically. Once a raise or lower API is used then that view will have an exclusive sibling order independent of insertion.
API Level: 9
Declaration
C#Copypublic 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
Declaration
C#Copypublic void Raise()
API Level: 9
Declaration
C#Copypublic void RaiseAbove(View target)
Parameters
Type | Name | Description |
---|---|---|
View | target | Will be raised above this view. |
Remarks
The sibling order of views within the parent will be updated automatically. Views on the level above the target view will still be shown above this view. Once a raise or lower API is used then that view will have an exclusive sibling order independent of insertion.
API Level: 9
Declaration
C#Copypublic 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
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#Copypublic override void Remove(View child)
Parameters
Type | Name | Description |
---|---|---|
View | child |
Overrides
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when deleting a view that is not a child of this view |
API Level: 4
Declaration
C#Copypublic void RemoveRenderer(uint index)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | index |
API Level: 3
Declaration
C#Copypublic void RemoveRenderer(Renderer renderer)
Parameters
Type | Name | Description |
---|---|---|
Renderer | renderer |
API Level: 3
ScreenToLocal(out Single, out Single, Single, Single)
Converts screen coordinates into the view's coordinate system using the default camera.
Declaration
C#Copypublic bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
Parameters
Type | Name | Description |
---|---|---|
System.Single | localX | On return, the X-coordinate relative to the view. |
System.Single | localY | On return, the Y-coordinate relative to the view. |
System.Single | screenX | The screen X-coordinate. |
System.Single | screenY | The screen Y-coordinate. |
Returns
Type | Description |
---|---|
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.
Declaration
C#Copypublic void SetPadding(PaddingType padding)
Parameters
Type | Name | Description |
---|---|---|
PaddingType | padding | Padding for the view. |
API Level: 3
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#Copypublic 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.
Declaration
C#Copy[Obsolete("This has been deprecated in API9 and will be removed in API11. Use StyleName property instead.")] public void SetStyleName(string styleName)
Parameters
Type | Name | Description |
---|---|---|
System.String | styleName | A string matching a style described in a stylesheet. |
API Level: 3
Declaration
C#Copypublic void Show()
Remarks
This is an asynchronous method.
API Level: 3
Unparent()
Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
Declaration
C#Copypublic void Unparent()
API Level: 4
Precondition: The (child) view has been initialized.
Events
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#Copypublic event EventHandler AddedToWindow
Event Type
Type | Description |
---|---|
System.EventHandler |
API Level: 3
Declaration
C#Copypublic event EventHandler<View.ChildAddedEventArgs> ChildAdded
Event Type
Type | Description |
---|---|
System.EventHandler<View.ChildAddedEventArgs> |
API Level: 5
Declaration
C#Copypublic event EventHandler<View.ChildRemovedEventArgs> ChildRemoved
Event Type
Type | Description |
---|---|
System.EventHandler<View.ChildRemovedEventArgs> |
API Level: 5
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#Copypublic event EventHandler FocusGained
Event Type
Type | Description |
---|---|
System.EventHandler |
API Level: 3
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#Copypublic event EventHandler FocusLost
Event Type
Type | Description |
---|---|
System.EventHandler |
API Level: 3
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#Copypublic event EventHandlerWithReturnType<object, View.HoverEventArgs, bool> HoverEvent
Event Type
Type | Description |
---|---|
EventHandlerWithReturnType<System.Object, View.HoverEventArgs, Boolean> |
API Level: 3
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#Copypublic event EventHandlerWithReturnType<object, View.KeyEventArgs, bool> KeyEvent
Event Type
Type | Description |
---|---|
EventHandlerWithReturnType<System.Object, View.KeyEventArgs, Boolean> |
API Level: 3
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#Copypublic event EventHandler<View.LayoutDirectionChangedEventArgs> LayoutDirectionChanged
Event Type
Type | Description |
---|---|
System.EventHandler<View.LayoutDirectionChangedEventArgs> |
API Level: 4
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#Copypublic event EventHandler Relayout
Event Type
Type | Description |
---|---|
System.EventHandler |
API Level: 3
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#Copypublic event EventHandler RemovedFromWindow
Event Type
Type | Description |
---|---|
System.EventHandler |
API Level: 3
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#Copypublic event EventHandler ResourcesLoaded
Event Type
Type | Description |
---|---|
System.EventHandler |
API Level: 3
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#Copypublic event EventHandlerWithReturnType<object, View.TouchEventArgs, bool> TouchEvent
Event Type
Type | Description |
---|---|
EventHandlerWithReturnType<System.Object, View.TouchEventArgs, Boolean> |
API Level: 3
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#Copypublic event EventHandler<View.VisibilityChangedEventArgs> VisibilityChanged
Event Type
Type | Description |
---|---|
System.EventHandler<View.VisibilityChangedEventArgs> |
API Level: 3
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#Copypublic event EventHandlerWithReturnType<object, View.WheelEventArgs, bool> WheelEvent
Event Type
Type | Description |
---|---|
EventHandlerWithReturnType<System.Object, View.WheelEventArgs, Boolean> |