FormField
Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll
The one labeled form row, used by every form of the host and the plugins: the label on the left (kept level with the input, also when a message appears below it), the input as content, and below the input either its validation error (red, small; the input’s own DataValidationErrors from INotifyDataErrorInfo, or FormField.Error for content without data validation such as a file row) or, when there is no error, the optional FormField.Hint. Nothing below the input takes space when there is no message. Column widths come from the theme (Oadm.FormLabelWidth, Oadm.FormInputWidth); class wide lets the input fill the row, class inline sizes the label to its text (fields in one line, e.g. IP range From / To). An empty label keeps the label column, so a check box lines up with the inputs. FormField.Info adds an InfoIcon right of the input: the explanation on hover and click, so the row needs no long hint. FormField.LabelAbove puts the label above the input, full width (the login window; SDK 0.5.0). FormField.Help puts a “?” with a short help at the right inside the input (SDK 0.15.0).
public sealed class FormField : GridInherits Grid
Guide: UI kit
XAML properties
Section titled “XAML properties”Set them in XAML (<ui:FormField Name="..." />) or bind them.
| Name | Type | Description |
|---|---|---|
Error |
string? |
An error for content without its own data validation (file rows, groups of inputs). Inputs bound to an INotifyDataErrorInfo property show their error themselves; leave this empty for them. |
HasError |
bool |
The field shows an error (its input’s validation error or FormField.Error). |
Help |
string? |
A short help of the field (classic field help, at most about 8 words, never the label again): a “?” at the right inside the input (a text box, password box, select, button or file row; beside a check box; at the right end of the label for a group of inputs) with the text as its tooltip and in a flyout on click. The theme gives the input room for it (`ui |
Hint |
string? |
Help text below the input (secondary, small), hidden while the field shows an error. |
Info |
string? |
What the field means, shown by an info icon right of the input (hover and click). |
InfoPicture |
IDataTemplate? |
Optional: a drawing below FormField.Info in its tooltip and flyout (InfoIcon.PictureTemplate). |
Input |
Control? |
The input (XAML content). |
InputWidth |
double |
Width of the input column; NaN fills the rest of the row. |
Label |
string? |
The label left of the input; empty keeps the column so the row lines up. |
LabelAbove |
bool |
The label above the input (full width) instead of left of it. |
LabelHeight |
double |
Height the label is centered in: the height of a single-line input. |
LabelWidth |
double |
Width of the label column; NaN sizes it to the label text. |
Properties
Section titled “Properties”HelpButton
Section titled “HelpButton”Button HelpButton { get; }The “?” of FormField.Help (tests).
MessageText
Section titled “MessageText”string? MessageText { get; }The text shown below the input (error or hint), for tests.