Table of Contents

Class DisplayAttribute

Namespace
Stride.Core
Assembly
Stride.Core.dll

Portable DisplayAttribute equivalent to DisplayAttribute.

public class DisplayAttribute : Attribute
Inheritance
DisplayAttribute
Inherited Members

Constructors

DisplayAttribute(int, string, string)

Initializes a new instance of the DisplayAttribute class.

public DisplayAttribute(int order, string name = null, string category = null)

Parameters

order int

The order weight of the column.

name string

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

category string

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

name string

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

category string

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

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

bool

Category

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

public string Category { get; }

Property Value

string

The category.

CustomHue

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

public float? CustomHue { get; set; }

Property Value

float?

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

ExpandRule

Name

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

public string Name { get; }

Property Value

string

The name.

Order

Gets the order weight of the column.

public int? Order { get; }

Property Value

int?

The order.

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

memberInfo MemberInfo

Member type (Property, Field or Type).

Returns

DisplayAttribute

DisplayAttribute.

Exceptions

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 Type

The type for which to get the display name.

Returns

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

memberInfo MemberInfo

Returns

int?