int Value { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Value property of the OrderAttribute class specifies the visual order of a member for user interface purposes. This integer value can be used to determine the sequence in which UI elements are displayed, allowing for a customizable and organized presentation of components or fields.

Usage

To use the OrderAttribute and its Value property, apply the attribute to a class member, such as a property or field, and specify an integer value to indicate its order. This value can then be accessed through the DisplayInfo library to arrange UI elements accordingly.

Example

// Example of using OrderAttribute to specify the order of properties in a UI
public class MyComponent : Component
{
    [Order(1)]
    public int FirstProperty { get; set; }

    [Order(2)]
    public int SecondProperty { get; set; }

    [Order(3)]
    public int ThirdProperty { get; set; }
}