Class BaseField<TValueType>
Abstract base class for controls.
Inheritance
BaseField<TValueType>
Syntax
public abstract class BaseField<TValueType> : BindableElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IBindable, INotifyValueChanged<TValueType>, IMixedValueSupport
Type Parameters
Name |
Description |
TValueType |
|
Constructors
BaseField(String, VisualElement)
Declaration
protected BaseField(string label, VisualElement visualInput)
Parameters
Fields
USS class name of input elements in elements of this type.
Declaration
public static readonly string inputUssClassName
Field Value
labelDraggerVariantUssClassName
USS class name of labels in elements of this type, when there is a dragger attached on them.
Declaration
public static readonly string labelDraggerVariantUssClassName
Field Value
labelUssClassName
USS class name of labels in elements of this type.
Declaration
public static readonly string labelUssClassName
Field Value
mixedValueLabelUssClassName
USS class name of elements that show mixed values
Declaration
public static readonly string mixedValueLabelUssClassName
Field Value
mixedValueString
Declaration
protected static readonly string mixedValueString
Field Value
noLabelVariantUssClassName
USS class name of elements of this type, when there is no label.
Declaration
public static readonly string noLabelVariantUssClassName
Field Value
ussClassName
USS class name of elements of this type.
Declaration
public static readonly string ussClassName
Field Value
Properties
label
The string representing the label that will appear beside the field.
Declaration
public string label { get; set; }
Property Value
labelElement
This is the Label object that appears beside the input for the field.
Declaration
public Label labelElement { get; }
Property Value
mixedValueLabel
Read-only label used to give the appearance of editing multiple different values.
Declaration
protected Label mixedValueLabel { get; }
Property Value
rawValue
The value of the element.
Declaration
protected TValueType rawValue { get; set; }
Property Value
Type |
Description |
TValueType |
|
showMixedValue
When set to true, gives the field the appearance of editing multiple different values.
Declaration
public bool showMixedValue { get; set; }
Property Value
Implements
value
The value associated with the field.
Declaration
public virtual TValueType value { get; set; }
Property Value
Type |
Description |
TValueType |
|
Implements
Methods
ExecuteDefaultAction(EventBase)
Declaration
protected override void ExecuteDefaultAction(EventBase evt)
Parameters
Overrides
SetValueWithoutNotify(TValueType)
Allow to set a value without being notified of the change, if any.
Declaration
public virtual void SetValueWithoutNotify(TValueType newValue)
Parameters
Type |
Name |
Description |
TValueType |
newValue |
New value to be set.
|
Implements
UpdateMixedValueContent()
Update the field's visual content depending on showMixedValue.
Declaration
protected virtual void UpdateMixedValueContent()
Extension Methods