Class Layer

Definition

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

Layers provide a mechanism for overlaying groups of actors on top of each other.

C#
Copy
public class Layer : Container, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
Inheritance
Implements

Constructors

View Source

Layer()

Creates a Layer object.

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

Properties

View Source

Behavior

Layer behavior, type String (Layer.LayerBehavior).

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

ChildCount

Get the number of children held by the layer.

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

Depth

Queries the depth of the layer.
0 is the bottommost layer, higher number is on the top.

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

ID

Gets the Layer's ID Readonly

Declaration
C#
Copy
public uint ID { get; }
Property Value
Type Description
UInt32
Remarks

Hidden-API

View Source

Name

Gets or sets the layer's name.

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

Opacity

Retrieves and sets the layer's opacity.

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

Viewport

Sets the viewport (in window coordinates), type rectangle. The contents of the layer will not be visible outside this box, when ViewportEnabled is true.

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

Visibility

Retrieves and sets the layer's visibility.

Declaration
C#
Copy
public bool Visibility { get; set; }
Property Value
Type Description
Boolean
API Level: 3

Methods

View Source

Add(View)

Adds a child view to this layer.

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

Dispose(DisposeTypes)

Dispose Explicit or Implicit

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

DownCast(BaseHandle)

Downcasts a handle to layer handle.

Declaration
C#
Copy
public static Layer DownCast(BaseHandle handle)
Parameters
Type Name Description
BaseHandle handle
Returns
Type Description
Layer
API Level: 3
View Source

FindChildById(UInt32)

Search through this layer's hierarchy for a view with the given unique ID.

Declaration
C#
Copy
public View FindChildById(uint id)
Parameters
Type Name Description
UInt32 id

The id of the child to find

Returns
Type Description
View

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

Remarks

The actor itself is also considered in the search.

API Level: 3
Precondition: This layer (the parent) has been initialized.
View Source

FindChildByName(String)

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

GetChildAt(UInt32)

Retrieves a child view by the index.

Declaration
C#
Copy
public override View GetChildAt(uint index)
Parameters
Type Name Description
UInt32 index

The index of the child to retrieve.

Returns
Type Description
View

The view for the given index or empty handle if children not initialized.

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

GetChildCount()

Get the child count of the layer.

Declaration
C#
Copy
public override uint GetChildCount()
Returns
Type Description
UInt32

The child count of the layer.

Overrides
API Level: 4
View Source

GetParent()

Get parent of the layer.

Declaration
C#
Copy
public override Container GetParent()
Returns
Type Description
Container

The view's container

Overrides
API Level: 4
View Source

Lower()

Decrements the depth of the layer.

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

LowerToBottom()

Lowers the layer to the bottom.

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

MoveAbove(Layer)

Moves the layer directly above the given layer.
After the call, this layer's depth will be immediately above target.

Declaration
C#
Copy
public void MoveAbove(Layer target)
Parameters
Type Name Description
Layer target

The layer to get on top of.

API Level: 3
View Source

MoveBelow(Layer)

Moves the layer directly below the given layer.
After the call, this layer's depth will be immediately below target.

Declaration
C#
Copy
public void MoveBelow(Layer target)
Parameters
Type Name Description
Layer target

The layer to get below of.

API Level: 3
View Source

Raise()

Increments the depth of the layer.

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

RaiseToTop()

Raises the layer to the top.

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

ReleaseSwigCPtr(Runtime.InteropServices.HandleRef)

Declaration
C#
Copy
protected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type Name Description
Tizen.System.Runtime.InteropServices.HandleRef swigCPtr
Overrides
View Source

Remove(View)

Removes a child view from this layer. If the view was not a child of this layer, 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

SetAnchorPoint(Vector3)

Declaration
C#
Copy
public void SetAnchorPoint(Vector3 anchorPoint)
Parameters
Type Name Description
Vector3 anchorPoint
View Source

SetHoverConsumed(Boolean)

Inhouse API. This allows the user to specify whether this layer should consume hover. If set, any layers behind this layer will not be hit-test.

Declaration
C#
Copy
public void SetHoverConsumed(bool consume)
Parameters
Type Name Description
Boolean consume

Whether the layer should consume hover

View Source

SetParentOrigin(Vector3)

Declaration
C#
Copy
public void SetParentOrigin(Vector3 parentOrigin)
Parameters
Type Name Description
Vector3 parentOrigin
View Source

SetResizePolicy(ResizePolicyType, DimensionType)

Declaration
C#
Copy
public void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
Parameters
Type Name Description
ResizePolicyType policy
DimensionType dimension
View Source

SetSize(Single, Single)

Declaration
C#
Copy
public void SetSize(float width, float height)
Parameters
Type Name Description
Single width
Single height
View Source

SetTouchConsumed(Boolean)

Inhouse API. This allows the user to specify whether this layer should consume touch (including gestures). If set, any layers behind this layer will not be hit-test.

Declaration
C#
Copy
public void SetTouchConsumed(bool consume)
Parameters
Type Name Description
Boolean consume

Whether the layer should consume touch (including gestures).

Events

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<Layer.VisibilityChangedEventArgs> VisibilityChanged
Event Type
Type Description
EventHandler<Layer.VisibilityChangedEventArgs>

Implements

Extension Methods