Interface that represents the context of the form field.
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public interface IFormFieldContextGets or sets a value indicating whether the label is floating or fixed on top.
public bool AllowFloatingLabel { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether the label is floating or fixed on top. |
Notifies the form field that the disabled state of the component has changed.
public Action<bool> DisabledChanged { get; set; }
| Type | Description |
|---|---|
| Action<bool> | Notifies the form field that the disabled state of the component has changed. |
Gets the id of the form field label when owner registered the label target, otherwise null. Components whose focusable element cannot be the target of the label for attribute render it as aria-labelledby so the label still names them.
public virtual string GetLabelId(object owner)
| Type | Name | Description |
|---|---|---|
| object | owner | The component asking for the label id. |
| Type | Description |
|---|---|
| string |
Registers the id of the element the form field label points to with its for attribute. The form field uses it unless Component is set. The first component to register owns the target until it passes null, so components nested inside another form component do not take the label over.
public virtual void SetLabelTarget(object owner, string id)
| Type | Name | Description |
|---|---|---|
| object | owner | The component registering the target. |
| string | id | The id of the element the label points to or null to release the target. |