Class PropertyDefinition
- Namespace
- RDCore.Forms.Model
- Assembly
- RDCore.Forms.dll
A property of a component class: its name, its value type, and its default.
public abstract class PropertyDefinition
- Inheritance
-
PropertyDefinition
- Derived
- Inherited Members
Remarks
A definition is shared by every class that has the property. A class can give it a default of its own
(DefaultOf(PropertyDefinition)): a TextBox's BackColor defaults to the window colour
where most controls default to the button face. Names compare without regard to case, as VB does.
Properties
BoxedDefault
The default value the definition declares, before any class gives it one of its own.
public abstract object? BoxedDefault { get; }
Property Value
Category
The group a designer shows the property under.
public PropertyCategory Category { get; }
Property Value
Name
The property's name, as code and a designer file spell it.
public string Name { get; }
Property Value
NotAvailableAtRunTime
Whether a program can neither read nor set the property, which only a designer and a form's file set. VB refuses a program's read with GetNotSupportedAtRuntime and its assignment with SetNotSupportedAtRuntime.
public bool NotAvailableAtRunTime { get; init; }
Property Value
Remarks
A class can make a property it shares with other classes unavailable on its own instances: ask the class, with IsNotAvailableAtRunTime(PropertyDefinition) and IsReadOnlyAtRunTime(PropertyDefinition).
ReadOnlyAtRunTime
Whether a program cannot set the property, which only a designer and a form's file set. VB refuses a program's assignment with SetNotSupportedAtRuntime, and early-bound code that assigns it does not compile.
public bool ReadOnlyAtRunTime { get; init; }
Property Value
Remarks
A property that is NotAvailableAtRunTime cannot be set either, and a class can make a property unavailable on its own instances: ask the class, with IsReadOnlyAtRunTime(PropertyDefinition).
RunTimeOnly
Whether only a running program reads and sets the property, such as a TextBox's SelStart: a form's file does not hold
it, and a designer does not show it.
public bool RunTimeOnly { get; init; }
Property Value
Remarks
The VB6 and XAML readers do not take it from a file, and the XAML writer leaves it out.
ValueType
The CLR type of the property's values. A null value is allowed for a reference type and a nullable value type.
public abstract Type ValueType { get; }
Property Value
Methods
Accepts(object?)
Whether value can be held by this property: a value of ValueType that is among the
property's valid values, or null where the type allows it.
public bool Accepts(object? value)
Parameters
valueobjectThe value to test.
Returns
Remarks
A program's assignment of a value the property cannot hold is VB's 380, Invalid property value.
ToString()
The property's name.
public override string ToString()
Returns
- string
The property's name.