Class PropertyDefinition<T>
- Namespace
- RDCore.Forms.Model
- Assembly
- RDCore.Forms.dll
A property of a component class whose values are of type T.
public sealed class PropertyDefinition<T> : PropertyDefinition
Type Parameters
TThe CLR type of the property's values.
- Inheritance
-
PropertyDefinition<T>
- Inherited Members
Constructors
PropertyDefinition(string, PropertyCategory, T)
A property of a component class whose values are of type T.
public PropertyDefinition(string name, PropertyCategory category, T defaultValue = default)
Parameters
namestringThe property's name, as code and a designer file spell it.
categoryPropertyCategoryThe group a designer shows the property under.
defaultValueTThe value a component has when nothing sets the property.
Properties
BoxedDefault
The default value the definition declares, before any class gives it one of its own.
public override object? BoxedDefault { get; }
Property Value
Coerce
What a component holds when the property is set to a value, from the value and the component's other properties, or null for the value as set.
public Func<ComponentInstance, T, T>? Coerce { get; init; }
Property Value
- Func<ComponentInstance, T, T>
Default
The value a component has when nothing sets the property, unless its class gives the property a default of its own.
public T Default { get; }
Property Value
- T
Valid
Which values of its type the property can hold, or null where it can hold all of them.
public Func<T, bool>? Valid { get; init; }
Property Value
ValueType
The CLR type of the property's values. A null value is allowed for a reference type and a nullable value type.
public override Type ValueType { get; }