Table of Contents

Class TabAttribute

Namespace
OFT.Attributes
Assembly
OFT.Attributes.dll

Attribute that assigns a property or all properties of a class to a named tab in the settings UI. Use alongside System.ComponentModel.DataAnnotations.DisplayAttribute for property display metadata (Name, GroupName, Description, Order).

Added in ATAS 8.0.15.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class TabAttribute : Attribute
Inheritance
object
Attribute
TabAttribute
Extension Methods

Constructors

TabAttribute()

Initializes the attribute; set TabName.

public TabAttribute()

Properties

ResourceType

Resource type for localization of TabName.

public Type? ResourceType { get; set; }

Property Value

Type

TabName

Tab name. If ResourceType is set, this is treated as a resource key.

public string? TabName { get; set; }

Property Value

string

TabOrder

Tab display order. Lower values appear first. Tabs with equal order are sorted by the order their first property appears in the class. When not set, the tab is sorted purely by its source declaration order.

public int TabOrder { get; set; }

Property Value

int

Methods

GetLocalizedTab()

Gets the localized tab name. Returns null if TabName is not set.

public string? GetLocalizedTab()

Returns

string

GetTabOrder()

Returns the explicitly assigned TabOrder, or null if not set.

public int? GetTabOrder()

Returns

int?