IFormFieldContext Interface

Interface that represents the context of the form field.

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public interface IFormFieldContext

Properties

AllowFloatingLabelLink to this section

Gets or sets a value indicating whether the label is floating or fixed on top.

Declaration
public bool AllowFloatingLabel { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether the label is floating or fixed on top.

DisabledChangedLink to this section

Notifies the form field that the disabled state of the component has changed.

Declaration
public Action<bool> DisabledChanged { get; set; }
Property Value
Type Description
Action<bool>Notifies the form field that the disabled state of the component has changed.

Methods

GetLabelIdLink to this section

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.

Declaration
public virtual string GetLabelId(object owner)
Parameters
Type Name Description
object owner The component asking for the label id.
Returns
Type Description
string

SetLabelTargetLink to this section

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.

Declaration
public virtual void SetLabelTarget(object owner, string id)
Parameters
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.
In This Article
An error has occurred. This app may no longer respond until reloaded. Reload 🗙