Skip to content

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.

public sealed class FormField : Grid

Inherits Grid

Guide: UI kit

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).
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).
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.
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.
string? MessageText { get; }

The text shown below the input (error or hint), for tests.