OpenTAP 9.25
API Reference
Public Member Functions | Static Public Attributes | Properties | List of all members
OpenTap.DisplayAttribute Class Reference

Defines how a property, class, enum, or other item is presented to the user. Also configures the description and allows items to be grouped and ordered. More...

Inheritance diagram for OpenTap.DisplayAttribute:
OpenTap.IDisplayAnnotation OpenTap.IAnnotation OpenTap.DefaultDisplayAttribute

Public Member Functions

string GetFullName ()
 Gets the Group (or Groups) and Name concatenated with a backslash ().
 
 DisplayAttribute (string Name, string Description=null, string Group=null, double Order=DefaultOrder, bool Collapsed=false, string[] Groups=null)
 Creates a new instance of DisplayAttribute. Ensures that Name is never null. More...
 
override bool Equals (object obj)
 Overriding Equals to fix strange equality issues between instances of DisplayAttribute.
 
override int GetHashCode ()
 Generates a hash code based on the display attribute values.
 

Static Public Attributes

const double DefaultOrder = -10000.0
 The default order for display attribute. This is set in this way to highlight the fact that an order is not set and out of the range of normally selected order values. '0' for example is a commonly selected value for order, so it could not be that.
 

Properties

string Description [get]
 Optional text that provides a description of the item. Consider using HelpLinkAttribute if a link to documentation is needed.
 
string[] Group [get]
 Optional text used to group displayed items. Use 'Groups' if more than one level of grouping is needed.
 
string Name [get]
 Name displayed by the UI.
 
double Order [get]
 Optional integer that ranks items and groups in ascending order relative to other items/groups. Default is -10000. For a group, the order is the average order of the elements inside the group. Any double value is allowed. Items with same order are ranked alphabetically. More...
 
bool Collapsed [get]
 Boolean setting that indicates whether a group's default appearance is collapsed. Default is 'false' (group is expanded).
 
- Properties inherited from OpenTap.IDisplayAnnotation
string Description [get]
 Optional text that provides a description of the item.
 
string[] Group [get]
 Optional text used to group displayed items.
 
string Name [get]
 Name displayed by the UI.
 
double Order [get]
 Optional integer that ranks items and groups in ascending order relative to other items/groups. Default is -10000. For a group, the order is the average order of the elements inside the group. Any double value is allowed. Items with same order are ranked alphabetically.
 
bool Collapsed [get]
 Boolean setting that indicates whether a group's default appearance is collapsed.
 

Detailed Description

Defines how a property, class, enum, or other item is presented to the user. Also configures the description and allows items to be grouped and ordered.

Constructor & Destructor Documentation

◆ DisplayAttribute()

OpenTap.DisplayAttribute.DisplayAttribute ( string  Name,
string  Description = null,
string  Group = null,
double  Order = DefaultOrder,
bool  Collapsed = false,
string[]  Groups = null 
)
inline

Creates a new instance of DisplayAttribute. Ensures that Name is never null.

Parameters
NameName displayed by the UI.
DescriptionOptional text that provides a description of the item. Consider using HelpLinkAttribute if a link to documentation is needed.
GroupOptional text used to group displayed items. Use 'Groups' if more than one level of grouping is needed.
OrderOptional integer that ranks items and groups in ascending order relative to other items/groups. Default is defined by DisplayAttribute.DefaultOrder. For a group, the order is the average order of the elements inside the group. Any double value is allowed. Items with same order are ranked alphabetically.
CollapsedBoolean setting that indicates whether a group's default appearance is collapsed. Default is 'false' (group is expanded).
GroupsOptional array of text strings to specify multiple levels of grouping. Use 'Group' if only one level of grouping is needed.

Property Documentation

◆ Order

double OpenTap.DisplayAttribute.Order
get

Optional integer that ranks items and groups in ascending order relative to other items/groups. Default is -10000. For a group, the order is the average order of the elements inside the group. Any double value is allowed. Items with same order are ranked alphabetically.

This applies only to properties. Classes will ignore this setting and be ordered alphabetically.

OpenTAP 9.25 API built Tue Aug 6 2024 07:49:23