Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    DisplayAttribute Class

    Namespace: Stride.Core
    Assembly: Stride.Core.dll

    Portable DisplayAttribute equivalent to .

    System.Object → System.Attribute → DisplayAttribute
    Derived from DisplayAttribute:

    public class DisplayAttribute : Attribute
    Name Description
    Constructors
    DisplayAttribute(Int32, String, String)

    Initializes a new instance of the DisplayAttribute class.

    DisplayAttribute(String, String)

    Initializes a new instance of the DisplayAttribute class.

    Properties
    Browsable

    Gets or sets whether the related member is browsable when its class is exposed in the UI.

    Category

    Gets a string that is used to group fields in the UI.

    CustomHue

    Gets the hue of a color that is used in the UI.

    Expand

    Gets or sets whether to expand the control representing the associated object in the UI.

    Name

    Gets a string that is used for display in the UI.

    Order

    Gets the order weight of the column.

    Methods
    GetDisplay(MemberInfo)

    Gets the display attribute attached to the specified member info.

    GetDisplayName(Type)

    Gets the display name of the given type. The display name is the name of the type, or, if the DisplayAttribute is applied on the type, value of the Name property.

    GetOrder(MemberInfo)
    | Improve this Doc View Source

    Constructors


    DisplayAttribute(Int32, String, String)

    Initializes a new instance of the DisplayAttribute class.

    public DisplayAttribute(int order, string name = null, string category = null)
    Parameters
    Type Name Description
    System.Int32 order

    The order weight of the column.

    System.String name

    A value that is used for display in the UI..

    System.String category

    A value that is used to group fields in the UI..


    DisplayAttribute(String, String)

    Initializes a new instance of the DisplayAttribute class.

    public DisplayAttribute(string name = null, string category = null)
    Parameters
    Type Name Description
    System.String name

    A value that is used for display in the UI..

    System.String category

    A value that is used to group fields in the UI..

    | Improve this Doc View Source

    Properties


    Browsable

    Gets or sets whether the related member is browsable when its class is exposed in the UI.

    public bool Browsable { get; set; }
    Property Value
    Type Description
    System.Boolean

    Category

    Gets a string that is used to group fields in the UI.

    public string Category { get; }
    Property Value
    Type Description
    System.String

    The category.


    CustomHue

    Gets the hue of a color that is used in the UI.

    public float? CustomHue { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Single>
    Remarks

    If not null, this value must be in the range [0, 360].


    Expand

    Gets or sets whether to expand the control representing the associated object in the UI.

    public ExpandRule Expand { get; set; }
    Property Value
    Type Description
    ExpandRule

    Name

    Gets a string that is used for display in the UI.

    public string Name { get; }
    Property Value
    Type Description
    System.String

    The name.


    Order

    Gets the order weight of the column.

    public int? Order { get; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    The order.

    | Improve this Doc View Source

    Methods


    GetDisplay(MemberInfo)

    Gets the display attribute attached to the specified member info.

    [Obsolete("Display attribute should be retrieved via an AttributeRegistry.")]
    public static DisplayAttribute GetDisplay(MemberInfo memberInfo)
    Parameters
    Type Name Description
    System.Reflection.MemberInfo memberInfo

    Member type (Property, Field or Type).

    Returns
    Type Description
    DisplayAttribute

    DisplayAttribute.

    Exceptions
    Type Condition
    System.ArgumentNullException

    memberInfo


    GetDisplayName(Type)

    Gets the display name of the given type. The display name is the name of the type, or, if the DisplayAttribute is applied on the type, value of the Name property.

    [Obsolete("Display attribute should be retrieved via an AttributeRegistry.")]
    public static string GetDisplayName(Type type)
    Parameters
    Type Name Description
    System.Type type

    The type for which to get the display name.

    Returns
    Type Description
    System.String

    A string representing the display name of the type.


    GetOrder(MemberInfo)

    [Obsolete("Display attribute should be retrieved via an AttributeRegistry.")]
    public static int? GetOrder(MemberInfo memberInfo)
    Parameters
    Type Name Description
    System.Reflection.MemberInfo memberInfo
    Returns
    Type Description
    System.Nullable<System.Int32>

    Inherited Members

    System.Attribute.Equals(System.Object)
    System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
    System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
    System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
    System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
    System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
    System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
    System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
    System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
    System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
    System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
    System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
    System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.Module)
    System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
    System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
    System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
    System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
    System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
    System.Attribute.GetHashCode()
    System.Attribute.IsDefaultAttribute()
    System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
    System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
    System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
    System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
    System.Attribute.IsDefined(System.Reflection.Module, System.Type)
    System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
    System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
    System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
    System.Attribute.Match(System.Object)
    System.Attribute.TypeId

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation