ConditionalAvailability (attribute): Difference between revisions
From MXMS Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
The ConditionalAvailability attribute is used to show a property only when it's attribute condition is met. | [[File:Conditional-Availability.png|right|400px|An example usage of the Conditional availability attribute]] | ||
The ConditionalAvailability attribute is used to show a property only when it's attribute condition is met. The condition must be defined in the class where the condition is defined. Determination of the condition is client side only. | |||
== Example == | == Example == | ||
Latest revision as of 05:32, 3 April 2026

The ConditionalAvailability attribute is used to show a property only when it's attribute condition is met. The condition must be defined in the class where the condition is defined. Determination of the condition is client side only.
Example
public virtual bool Enabled
{
get; set;
}
[ConditionalAvailability("Enabled", ConditionalAvailabilityMode.Equals, true)]
public virtual string ConditionalProperty
{
get; set;
}
In de example above property ConditionalProperty will be visible only when the Enabled Property is true. If a user changes the Enabled property the ConditionalProperty becomes available immediately without first saving.