ConditionalAvailability (attribute): Difference between revisions
From MXMS Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 14: | Line 14: | ||
} | } | ||
</pre> | </pre> | ||
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. | |||
Revision as of 05:25, 3 April 2026
The ConditionalAvailability attribute is used to show a property only when it's attribute condition is met.
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.