Class Layer

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.dll

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

    public class Layer : Container, IDynamicResourceHandler, INameScope, System.IDisposable, IResourcesProvider
    Inheritance
    object
    BindableObject
    Element
    BaseHandle
    Animatable
    Container
    Layer
    Implements
    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider

    Constructors

    View Source

    Layer()

    Default constructor of Layer class to create a Layer object.

    Declaration
    public Layer()

    Properties

    View Source

    AliveCount

    Gets the number of currently alived Layer object.

    Declaration
    public static int AliveCount { get; }
    Property Value
    Type Description
    int
    View Source

    Behavior

    Layer behavior, type String (Layer.LayerBehavior).

    Declaration
    public Layer.LayerBehavior Behavior { get; set; }
    Property Value
    Type Description
    Layer.LayerBehavior
    View Source

    ChildCount

    Get the number of children held by the layer.

    Declaration
    public uint ChildCount { get; }
    Property Value
    Type Description
    uint
    View Source

    Depth

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

    Declaration
    public uint Depth { get; }
    Property Value
    Type Description
    uint
    View Source

    ID

    Gets the Layer's ID Readonly

    Declaration
    public uint ID { get; }
    Property Value
    Type Description
    uint
    Remarks

    Hidden-API

    View Source

    Ignored

    Gets of sets the flag to identify the Layer will be ignored or not. If the Layer is marked as ignored, it will not be rendered and will be excluded from render thread computation. So, the render thread properties like WorldPosition and WorldColor become inaccurate.

    Declaration
    public bool Ignored { get; set; }
    Property Value
    Type Description
    bool
    View Source

    Name

    Gets or sets the layer's name.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string
    View Source

    Opacity

    Retrieves and sets the layer's opacity.

    Declaration
    public float Opacity { get; set; }
    Property Value
    Type Description
    float
    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
    public Rectangle Viewport { get; set; }
    Property Value
    Type Description
    Rectangle
    View Source

    Visibility

    Retrieves and sets the layer's visibility.

    Declaration
    public bool Visibility { get; set; }
    Property Value
    Type Description
    bool

    Methods

    View Source

    Add(View)

    Adds a child view to this layer.

    Declaration
    public override void Add(View child)
    Parameters
    Type Name Description
    View child
    Overrides
    Container.Add(View)
    See Also
    Add(View)
    View Source

    Dispose(DisposeTypes)

    Dispose. Releases unmanaged and optionally managed resources.

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

    Explicit to release both managed and unmanaged resources. Implicit to release only unmanaged resources.

    Overrides
    BaseHandle.Dispose(DisposeTypes)
    Remarks

    When overriding this method, you need to distinguish between explicit and implicit conditions. For explicit conditions, release both managed and unmanaged resources. For implicit conditions, only release unmanaged resources.

    View Source

    DownCast(BaseHandle)

    Downcasts a handle to layer handle.

    Declaration
    public static Layer DownCast(BaseHandle handle)
    Parameters
    Type Name Description
    BaseHandle handle
    Returns
    Type Description
    Layer
    View Source

    FindChildById(uint)

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

    Declaration
    public View FindChildById(uint id)
    Parameters
    Type Name Description
    uint 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.

    View Source

    FindChildByName(string)

    Declaration
    public View FindChildByName(string viewName)
    Parameters
    Type Name Description
    string viewName
    Returns
    Type Description
    View
    View Source

    GetChildAt(uint)

    Retrieves a child view by the index.

    Declaration
    public override View GetChildAt(uint index)
    Parameters
    Type Name Description
    uint 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
    Container.GetChildAt(uint)
    View Source

    GetChildCount()

    Get the child count of the layer.

    Declaration
    public override uint GetChildCount()
    Returns
    Type Description
    uint

    The child count of the layer.

    Overrides
    Container.GetChildCount()
    View Source

    GetParent()

    Get parent of the layer.

    Declaration
    public override Container GetParent()
    Returns
    Type Description
    Container

    The view's container

    Overrides
    Container.GetParent()
    View Source

    Lower()

    Decrements the depth of the layer.

    Declaration
    public void Lower()
    View Source

    LowerToBottom()

    Lowers the layer to the bottom.

    Declaration
    public void LowerToBottom()
    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
    public void MoveAbove(Layer target)
    Parameters
    Type Name Description
    Layer target

    The layer to get on top of.

    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
    public void MoveBelow(Layer target)
    Parameters
    Type Name Description
    Layer target

    The layer to get below of.

    View Source

    Raise()

    Increments the depth of the layer.

    Declaration
    public void Raise()
    View Source

    RaiseToTop()

    Raises the layer to the top.

    Declaration
    public void RaiseToTop()
    View Source

    ReleaseSwigCPtr(HandleRef)

    Declaration
    protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
    Parameters
    Type Name Description
    System.Runtime.InteropServices.HandleRef swigCPtr
    Overrides
    Animatable.ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef)
    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
    public override void Remove(View child)
    Parameters
    Type Name Description
    View child
    Overrides
    Container.Remove(View)
    See Also
    Remove(View)
    View Source

    SetAnchorPoint(Vector3)

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

    SetHoverConsumed(bool)

    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
    public void SetHoverConsumed(bool consume)
    Parameters
    Type Name Description
    bool consume

    Whether the layer should consume hover

    View Source

    SetParentOrigin(Vector3)

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

    SetResizePolicy(ResizePolicyType, DimensionType)

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

    SetSize(float, float)

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

    SetTouchConsumed(bool)

    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
    public void SetTouchConsumed(bool consume)
    Parameters
    Type Name Description
    bool consume

    Whether the layer should consume touch (including gestures).

    Events

    View Source

    AggregatedVisibilityChanged

    An event for aggregated visibility change which can be used to subscribe or unsubscribe the event handler.
    This event is sent when visible property of this or any of its parents (right up to the root) and Window changes.

    Declaration
    public event EventHandler<AggregatedVisibilityChangedEventArgs> AggregatedVisibilityChanged
    Event Type
    Type Description
    EventHandler<><AggregatedVisibilityChangedEventArgs>
    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
    public event EventHandler<Layer.VisibilityChangedEventArgs> VisibilityChanged
    Event Type
    Type Description
    EventHandler<><VisibilityChangedEventArgs>

    Implements

    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider

    Extension Methods

    BindableObjectExtensions.SetBinding(BindableObject, BindableProperty, string, BindingMode, IValueConverter, string)
    NameScopeExtensions.FindByName<T>(Element, string)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX