Class ViewExtensions

    Definition

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

    Markup extensions for View.

    public static class ViewExtensions
    Inheritance
    object
    ViewExtensions

    Methods

    View Source

    BackgroundColor(View)

    Experimental getter for background color

    Declaration
    public static UIColor BackgroundColor(this View view)
    Parameters
    Type Name Description
    View view

    The extension target.

    Returns
    Type Description
    UIColor

    The background color value.

    View Source

    BackgroundColor<T>(T, float, float, float, float)

    Sets the background color of the view.

    Declaration
    public static T BackgroundColor<T>(this T view, float r, float g, float b, float a = 1) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float r

    The red component.

    float g

    The green component.

    float b

    The blue component.

    float a

    The alpha component.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    BackgroundColor<T>(T, uint, float)

    Sets the background color of the view.

    Declaration
    public static T BackgroundColor<T>(this T view, uint value, float alpha) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    uint value

    The value of 0xRRGGBB format.

    float alpha

    The alpha value between 0.0 and 1.0.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    Examples
        new UIColor(0xFF0000, 1f); // Solid red
        new UIColor(0x00FF00, 0.5f) // Half transparent green
    View Source

    BackgroundColor<T>(T, UIColor)

    Sets the background color of the view.

    Declaration
    public static T BackgroundColor<T>(this T view, UIColor color) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    UIColor color

    The color value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    BackgroundImage<T>(T, string)

    Sets the background image of the view.

    Declaration
    public static T BackgroundImage<T>(this T view, string url) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    string url

    The resource url.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    Borderline<T>(T, float, UIColor, float)

    Sets the borderline of the View.

    Declaration
    public static T Borderline<T>(this T view, float width, UIColor color, float offset) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float width

    The width value.

    UIColor color

    The color value.

    float offset

    The offset value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    BorderlineColor(View)

    Gets the color for the borderline of the View.

    Declaration
    public static UIColor BorderlineColor(this View view)
    Parameters
    Type Name Description
    View view

    The extension target.

    Returns
    Type Description
    UIColor

    The borderline color value.

    View Source

    BorderlineColor<T>(T, float, float, float, float)

    Sets the color for the borderline of the View.

    Declaration
    public static T BorderlineColor<T>(this T view, float r, float g, float b, float a = 1) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float r

    The red component.

    float g

    The green component.

    float b

    The blue component.

    float a

    The alpha component.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    BorderlineColor<T>(T, uint, float)

    Sets the color for the borderline of the View.

    Declaration
    public static T BorderlineColor<T>(this T view, uint value, float alpha) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    uint value

    The value of 0xRRGGBB format.

    float alpha

    The alpha value between 0.0 and 1.0.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    Examples
        new UIColor(0xFF0000, 1f); // Solid red
        new UIColor(0x00FF00, 0.5f) // Half transparent green
    View Source

    BorderlineColor<T>(T, UIColor)

    Sets the color for the borderline of the View.

    Declaration
    public static T BorderlineColor<T>(this T view, UIColor color) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    UIColor color

    The color value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    BorderlineOffset<T>(T, float)

    Sets the offset for the borderline of the View.

    Declaration
    public static T BorderlineOffset<T>(this T view, float offset) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float offset

    The offset value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    BorderlineWidth<T>(T, float)

    Sets the width for the borderline of the View.

    Declaration
    public static T BorderlineWidth<T>(this T view, float width) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float width

    The width value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    BoxShadow(View)

    Gets the box shadow of the view.

    Declaration
    public static UIShadow BoxShadow(this View view)
    Parameters
    Type Name Description
    View view

    The extension target.

    Returns
    Type Description
    UIShadow

    The box shadow value.

    View Source

    BoxShadow<T>(T, float, float, float)

    Sets the box shadow of the view.

    Declaration
    public static T BoxShadow<T>(this T view, float blurRadius, float offsetX = null, float offsetY = null) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float blurRadius

    The blur radius value for the shadow. Bigger value, much blurry.

    float offsetX

    Optional. The x offset value from the top left corner. The default is 0.

    float offsetY

    Optional. The y offset value from the top left corner. The default is 0.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    BoxShadow<T>(T, float, UIColor, float, float)

    Sets the box shadow of the view.

    Declaration
    public static T BoxShadow<T>(this T view, float blurRadius, UIColor color, float offsetX = null, float offsetY = null) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float blurRadius

    The blur radius value for the shadow. Bigger value, much blurry.

    UIColor color

    The color for the shadow.

    float offsetX

    Optional. The x offset value from the top left corner. The default is 0.

    float offsetY

    Optional. The y offset value from the top left corner. The default is 0.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    BoxShadow<T>(T, UIShadow)

    Sets the box shadow of the view.

    Declaration
    public static T BoxShadow<T>(this T view, UIShadow shadow) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    UIShadow shadow

    The shadow value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    ClippingMode<T>(T, ClippingModeType)

    Sets the clipping behavior (mode) of it's children.

    Declaration
    public static T ClippingMode<T>(this T view, ClippingModeType type) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    ClippingModeType type

    The clipping mode type value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    Color(View)

    Gets the color for the View.

    Declaration
    public static UIColor Color(this View view)
    Parameters
    Type Name Description
    View view

    The extension target.

    Returns
    Type Description
    UIColor

    The color value.

    View Source

    Color<T>(T, float, float, float, float)

    Sets the color of the view.

    Declaration
    public static T Color<T>(this T view, float r, float g, float b, float a = 1) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float r

    The red component.

    float g

    The green component.

    float b

    The blue component.

    float a

    The alpha component.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    Color<T>(T, uint, float)

    Sets the color of the view.

    Declaration
    public static T Color<T>(this T view, uint value, float alpha) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    uint value

    The value of 0xRRGGBB format.

    float alpha

    The alpha value between 0.0 and 1.0.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    Examples
        new UIColor(0xFF0000, 1f); // Solid red
        new UIColor(0x00FF00, 0.5f) // Half transparent green
    View Source

    Color<T>(T, UIColor)

    Sets the color of the view.

    Declaration
    public static T Color<T>(this T view, UIColor color) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    UIColor color

    The color value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    CornerRadius(View)

    Gets the corner radius of the view.

    Declaration
    public static UICorner CornerRadius(this View view)
    Parameters
    Type Name Description
    View view

    The extension target.

    Returns
    Type Description
    UICorner

    The corner radius value.

    View Source

    CornerRadius<T>(T, float, bool)

    Sets the corner radius of the view.

    Declaration
    public static T CornerRadius<T>(this T view, float uniform, bool isRelative = false) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float uniform

    The uniform corner value.

    bool isRelative

    Sets the corner radius policy to relative. The default is false.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    Remarks

    This sets both CornerRadius and CornerRadiusPolicy at once.

    View Source

    CornerRadius<T>(T, float, float, float, float, bool)

    Sets the corner radius of the view.

    Declaration
    public static T CornerRadius<T>(this T view, float topLeft, float topRight, float bottomRight, float bottomLeft, bool isRelative = false) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float topLeft

    The top-left value.

    float topRight

    The top-right value.

    float bottomRight

    The bottom-right value.

    float bottomLeft

    The bottom-left value.

    bool isRelative

    Sets the corner radius policy to relative. The default is false.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    Remarks

    This sets both CornerRadius and CornerRadiusPolicy at once.

    View Source

    CornerRadius<T>(T, UICorner)

    Sets the corner radius of the view.

    Declaration
    public static T CornerRadius<T>(this T view, UICorner corner) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    UICorner corner

    The corner value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    Remarks

    This sets both CornerRadius and CornerRadiusPolicy at once.

    View Source

    Focusable<T>(T, bool)

    Sets focusable of the view

    Declaration
    public static T Focusable<T>(this T view, bool focusable) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    bool focusable

    The focusable value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    FocusableChildren<T>(T, bool)

    Sets whether the children of this view can be focusable by keyboard navigation.

    Declaration
    public static T FocusableChildren<T>(this T view, bool focusable) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    bool focusable

    The focusable value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    FocusableInTouch<T>(T, bool)

    Sets whether the view can focus by touch.

    Declaration
    public static T FocusableInTouch<T>(this T view, bool focusable) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    bool focusable

    The focusable value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    ImageShadow<T>(T, ImageShadow)

    Sets the image shadow of the view.

    Declaration
    public static T ImageShadow<T>(this T view, ImageShadow shadow) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    ImageShadow shadow

    The image shadow value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    IsEnabled<T>(T, bool)

    Sets the status of whether the view should be enabled user interactions. If a View is made disabled, then user interactions including touch, focus, and actiavation is disabled.

    Declaration
    public static T IsEnabled<T>(this T view, bool enable) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    bool enable

    The enable value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    Layout<T>(T, LayoutItem)

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

    Declaration
    public static T Layout<T>(this T view, LayoutItem layout) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    LayoutItem layout

    The layout for the view.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    Opacity<T>(T, float)

    Sets the view's opacity

    Declaration
    public static T Opacity<T>(this T view, float opacity) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float opacity

    The opacity value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    Position<T>(T, float, float)

    Sets the position of the view.

    Declaration
    public static T Position<T>(this T view, float x, float y) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float x

    The x value.

    float y

    The y value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    PositionX<T>(T, float)

    Sets the position x of the view.

    Declaration
    public static T PositionX<T>(this T view, float x) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float x

    The x value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    PositionY<T>(T, float)

    Sets the position y of the view.

    Declaration
    public static T PositionY<T>(this T view, float y) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float y

    The y value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    Scale<T>(T, float, float)

    Sets the scale factor applied to the view.

    Declaration
    public static T Scale<T>(this T view, float scaleX, float scaleY) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float scaleX

    The scale x value.

    float scaleY

    The scale y value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    ScaleX<T>(T, float)

    Sets the scale X factor applied to the view.

    Declaration
    public static T ScaleX<T>(this T view, float scale) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float scale

    The scale value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    ScaleY<T>(T, float)

    Sets the scale Y factor applied to the view.

    Declaration
    public static T ScaleY<T>(this T view, float scale) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float scale

    The scale value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    Sensitive<T>(T, bool)

    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
    public static T Sensitive<T>(this T view, bool sensitive) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    bool sensitive

    The sensitive value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    Size<T>(T, float, float)

    Sets the size of the view.

    Declaration
    public static T Size<T>(this T view, float width, float height) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float width

    The width value.

    float height

    The height value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    SizeHeight<T>(T, float)

    Sets the size height of the view.

    Declaration
    public static T SizeHeight<T>(this T view, float height) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float height

    The width value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    SizeWidth<T>(T, float)

    Sets the size width of the view.

    Declaration
    public static T SizeWidth<T>(this T view, float width) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    float width

    The width value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    Visibility<T>(T, bool)

    Sets the visibility of the view. Visibility Show() Hide()

    Declaration
    public static T Visibility<T>(this T view, bool visiblity) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    bool visiblity

    The visibility value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    View Source

    VoiceInteractionName<T>(T, string)

    Set voice interaction name for Voice Touch.

    Declaration
    public static T VoiceInteractionName<T>(this T view, string name) where T : View
    Parameters
    Type Name Description
    T view

    The extension target.

    string name

    The name value.

    Returns
    Type Description
    T

    The view itself.

    Type Parameters
    Name Description
    T

    The type of the view.

    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX