-
Notifications
You must be signed in to change notification settings - Fork 32
Forge.Forms.Annotations
public class Forge.Forms.Annotations.ActionAttribute
: FormContentAttribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
String |
ActionName | Action identifier that is passed to handlers. |
Object |
ClosesDialog | Determines whether this action will close dialogs that host it. Accepts a boolean or a dynamic resource. |
String |
Content | Displayed content. Accepts a dynamic expression. |
Object |
Icon | Displayed icon. Accepts a PackIconKind or a dynamic resource. |
Object |
Interceptor | If set to an Forge.Forms.IActionInterceptor, that object will handle the action. Accepts an Forge.Forms.IActionInterceptor or a dynamic resource. |
Object |
IsCancel | Determines whether the escape key will invoke the action. Accepts a boolean or a dynamic resource. |
Object |
IsDefault | Determines whether the enter key will invoke the action. Accepts a boolean or a dynamic resource. |
Object |
IsEnabled | Determines whether this action can be performed. Accepts a boolean or a dynamic resource. |
Object |
IsLoading | Determines whether this button is loading or not. Accepts a boolean or a dynamic resource. |
Object |
IsPrimary | Determines whether the action has the style of a primary action. Accepts a boolean or a dynamic resource. |
Object |
IsReset | Determines whether the model will be reset to default values before the action is executed. Accepts a boolean or a dynamic resource. |
Object |
Parameter | Action parameter. Accepts a dynamic expression. |
Object |
Validates | Determines whether the model will be validated before the action is executed. Accepts a boolean or a dynamic resource. |
Methods
| Type | Name | Summary |
|---|---|---|
FormElement |
CreateElement() |
Specifies additional information about a field's data binding.
public class Forge.Forms.Annotations.BindingAttribute
: Attribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
String |
ConversionErrorMessage | |
String |
ConverterCulture | Indicates the culture name to use if this field uses data conversion. A null value indicates UI culture; an empty value indicates invariant culture; a string value will retrieve the culture by name. |
Int32 |
Delay | |
String |
StringFormat | |
UpdateSourceTrigger |
UpdateSourceTrigger | |
Boolean |
ValidatesOnDataErrors | |
Boolean |
ValidatesOnExceptions | |
Boolean |
ValidatesOnNotifyDataErrors |
Methods
| Type | Name | Summary |
|---|---|---|
void |
Apply(BindingOptions bindingOptions) |
public class Forge.Forms.Annotations.BreakAttribute
: FormContentAttribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
Object |
Height | Height of the break. Accepts a double or a dynamic resource. |
Methods
| Type | Name | Summary |
|---|---|---|
FormElement |
CreateElement() |
public class Forge.Forms.Annotations.CardAttribute
: FormContentAttribute, _AttributeMethods
| Type | Name | Summary |
|---|---|---|
FormElement |
CreateElement() |
Specifies which fields are displayed by default.
public enum Forge.Forms.Annotations.DefaultFields
: Enum, IComparable, IFormattable, IConvertibleEnum
| Value | Name | Summary |
|---|---|---|
0 |
AllExcludingReadonly | Properties with public getters and setters are displayed by default. |
1 |
AllIncludingReadonly | All public properties are displayed by default. |
2 |
None | No properties are displayed by default. Use Forge.Forms.Annotations.FieldAttribute to add properties. |
public class Forge.Forms.Annotations.DividerAttribute
: FormContentAttribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
Object |
HasMargin |
Methods
| Type | Name | Summary |
|---|---|---|
FormElement |
CreateElement() |
Allows specifying enum display text.
public class Forge.Forms.Annotations.EnumDisplayAttribute
: Attribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
String |
Name | Enumeration member name. Accepts a string or a dynamic expression. |
Indicates that the property is a form field and allows specifying its details.
public class Forge.Forms.Annotations.FieldAttribute
: Attribute, _AttributeFields
| Type | Name | Summary |
|---|---|---|
Boolean |
HasName |
Properties
| Type | Name | Summary |
|---|---|---|
Int32 |
Column | Specifies the column number. Applicable only when Forge.Forms.Annotations.FieldAttribute.Row is set. |
Int32 |
ColumnSpan | Specifies the column span. Applicable only when Forge.Forms.Annotations.FieldAttribute.Row is set. |
Object |
DefaultValue | Determines the default value of this field. Accepts an object of the same type as the property type or a dynamic expression. Some types such as DateTime and numbers can be deserialized from strings. |
Object |
Icon | The icon associated with the field. Not all field types may support icons. Accepts a MaterialDesignThemes.Wpf.PackIconKind or a dynamic resource. |
Object |
InitialFocus | Gets or sets a value indicating whether this controls gets initial focus. Accepts a boolean or a dynamic resource. |
Object |
IsReadOnly | Determines whether the field is editable. Accepts a boolean or a dynamic resource. |
Object |
IsVisible | Determines whether this field will be visible. Accepts a boolean or a dynamic resource. |
String |
Name | The display name of the field. Accepts a string or a dynamic expression. |
Int32 |
Position | Determines the relative position of this field in the form. Fields are sorted based on this value, which has a default value of 0. |
String |
Row | Specifies the row name. Fields sharing the same row name will be aligned in columns when possible. |
String |
ToolTip | The tooltip of the field which shows on hover. Accepts a string or a dynamic expression. |
Properties marked with this attribute will never be generated.
public class Forge.Forms.Annotations.FieldIgnoreAttribute
: Attribute, _AttributeAllows configuring generated forms.
public class Forge.Forms.Annotations.FormAttribute
: Attribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
Double[] |
Grid | Specifies grid column widths. Positive values indicate star widths, negative values indicate pixel widths. |
DefaultFields |
Mode | Specifies default field generation behavior. |
Represents content attached before or after form elements.
public abstract class Forge.Forms.Annotations.FormContentAttribute
: Attribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
Boolean |
InsertAfter | If set to true and this attribute is attached to a property, this element will be displayed after the field. If set to true and this attribute is attached to a class, this element will be displayed after the form contents. |
Object |
IsVisible | Determines whether this element will be visible. Accepts a boolean or a dynamic resource. |
Position |
LinePosition | |
Int32 |
Position | Determines the position relative to other elements added to the attribute target. |
Int32 |
RowSpan | |
Boolean |
ShareLine | |
Boolean |
StartsNewRow |
Methods
| Type | Name | Summary |
|---|---|---|
FormElement |
CreateElement() | Create a form element corresponding to this object. |
FormElement |
GetElement() | |
void |
InitializeElement(FormElement element) |
Draws accented heading text.
public class Forge.Forms.Annotations.HeadingAttribute
: TextElementAttribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
Object |
Icon | Displayed icon. Accepts a PackIconKind or a dynamic resource. |
Methods
| Type | Name | Summary |
|---|---|---|
FormElement |
CreateElement() |
Specifies validation type.
public enum Forge.Forms.Annotations.Must
: Enum, IComparable, IFormattable, IConvertibleEnum
| Value | Name | Summary |
|---|---|---|
0 |
BeEqualTo | Property must equal to a value. |
1 |
NotBeEqualTo | Property must not equal to a value. |
2 |
BeGreaterThan | Property must be greater than a value. |
3 |
BeGreaterThanOrEqualTo | Property must be greater than or equal to a value. |
4 |
BeLessThan | Property must be less than a value. |
5 |
BeLessThanOrEqualTo | Property must be less than or equal to a value. |
6 |
BeEmpty | Property must be empty. A string is empty if it is null or has length 0. A collection is empty if it is null or has 0 elements. |
7 |
NotBeEmpty | Property must not be empty. A string is empty if it is null or has length 0. A collection is empty if it is null or has 0 elements. |
8 |
BeTrue | Property must be true. |
9 |
BeFalse | Property must be false. |
10 |
BeNull | Property must be null. |
11 |
NotBeNull | Property must not be null. |
12 |
ExistIn | Property must exist in a collection. |
13 |
NotExistIn | Property must not exist in a collection. |
14 |
MatchPattern | Property must match a regex pattern. |
15 |
NotMatchPattern | Property must not match a regex pattern. |
16 |
SatisfyMethod | Property value must satisfy model's static method of signature: public static bool <Argument>( Forge.Forms.Validation.ValidationContext context). Throws if no such method is found. |
17 |
SatisfyContextMethod | Property value must satisfy context's static method of signature: public static bool <Argument>( Forge.Forms.Validation.ValidationContext context). Does nothing if no such method is found. |
public enum Forge.Forms.Annotations.Position
: Enum, IComparable, IFormattable, IConvertibleEnum
| Value | Name | Summary |
|---|---|---|
0 |
Right | |
1 |
Left |
Allows specifying regex replacements before applying the field value. Multiple attributes can be defined for the same property, which causes the output of each replacement to be piped to the input of the next replacement.
public class Forge.Forms.Annotations.ReplaceAttribute
: Attribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
String |
Pattern | Pattern to replace on conversion. Accepts a bound expression. |
Int32 |
Position | |
Object |
RegexOptions | Regex search options. Accepts a dynamic resource or System.Text.RegularExpressions.RegexOptions. |
String |
Replacement | Replacement string, which can contain regex replacement expressions. Accepts a bound expression. |
Methods
| Type | Name | Summary |
|---|---|---|
RegexReplacement |
GetReplacement() |
Allows attaching custom resources to fields or to the model. These resources become available to generated controls.
public class Forge.Forms.Annotations.ResourceAttribute
: Attribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
String |
Name | Resource name. Accepts a string. |
Object |
Value | Resource value. Accepts an object or a dynamic expresion. |
Specifies that a field can have values from a collection.
public class Forge.Forms.Annotations.SelectFromAttribute
: Attribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
String |
DisplayPath | Display member path. Accepts a string or a dynamic expression. |
Object |
ItemsSource | Selection items source. Accepts an array, an enum type, or a dynamic resource. |
String |
ItemStringFormat | Item string format. Accepts a string or a dynamic expression. |
Object |
SelectionType | Field selection type. Accepts a Forge.Forms.Annotations.SelectFromAttribute.SelectionType or a dynamic resource. |
String |
ValuePath | Display value path. Accepts a string or a dynamic expression. |
Determines how a selection field should be displayed.
public enum Forge.Forms.Annotations.SelectionType
: Enum, IComparable, IFormattable, IConvertibleEnum
| Value | Name | Summary |
|---|---|---|
0 |
ComboBox | A selectable ComboBox is displayed. |
1 |
ComboBoxEditable | An editable ComboBox is displayed. Falls back to a non-editable ComboBox if editing is not applicable for a property type. |
2 |
RadioButtons | A list of radio buttons is displayed. |
Draws regular text.
public class Forge.Forms.Annotations.TextAttribute
: TextElementAttribute, _AttributeMethods
| Type | Name | Summary |
|---|---|---|
FormElement |
CreateElement() |
Represents textual content in a form.
public abstract class Forge.Forms.Annotations.TextElementAttribute
: FormContentAttribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
Object |
IconPadding | Push text to the right to align with icons. Accepts a boolean or a dynamic resource. |
String |
Value | Element content. Accepts a string or a dynamic expression. |
Methods
| Type | Name | Summary |
|---|---|---|
void |
InitializeElement(FormElement element) |
Draws title text.
public class Forge.Forms.Annotations.TitleAttribute
: TextElementAttribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
Object |
Icon | Displayed icon. Accepts a PackIconKind or a dynamic resource. |
Methods
| Type | Name | Summary |
|---|---|---|
FormElement |
CreateElement() |
Specifies field validation action when an event occurs.
public enum Forge.Forms.Annotations.ValidationAction
: Enum, IComparable, IFormattable, IConvertibleEnum
| Value | Name | Summary |
|---|---|---|
0 |
DoNothing | Does nothing. |
1 |
ValidateField | Validates the field. |
2 |
ClearErrors | Clears the field of validation errors. |
Specifies a validation rule for a field.
public class Forge.Forms.Annotations.ValueAttribute
: Attribute, _AttributeProperties
| Type | Name | Summary |
|---|---|---|
Object |
Argument | Validator argument. Accepts an object or a dynamic expression. May be ignored or throw errors if the supplied value is not suitable for the validator. Accepts an object or a dynamic resource. |
ValidationAction |
ArgumentUpdatedAction | Specifies what happens when argument values change. |
Must |
Condition | Validator type. |
String |
Converter | Value converter name. |
Boolean |
HasValue | |
String |
Message | Error message if validation fails. Accepts a string or a dynamic expression. |
Boolean |
StrictValidation | If set to true, values that don't pass validation are prevented from being written to the property. |
Boolean |
ValidatesOnTargetUpdated | Determines whether property changes cause validation. |
Object |
When | Determines whether this validator is active. Accepts a boolean or a dynamic resource. |