Class FieldBase<T>
[JsonConverter(typeof(FieldJsonConverter))]
public abstract class FieldBase<T> : FieldBase, IField<T>, IField, IModel, INotifyPropertyChanged, IDataErrorInfo
Type Parameters
T
- Inheritance
-
FieldBase<T>
- Implements
-
IField<T>
- Derived
- Inherited Members
- Extension Methods
Constructors
FieldBase(ISurface, string, string)
protected FieldBase(ISurface surface, string label, string @namespace)
Parameters
Fields
Logger
protected readonly ILogger Logger
Field Value
Principal
protected readonly IPrincipal Principal
Field Value
Services
protected readonly IServices Services
Field Value
Properties
Content
Templated field content
public virtual IField Content { get; }
Property Value
HasChanges
public abstract bool HasChanges { get; }
Property Value
HasLabel
True if the field should be labelled inline
public virtual bool HasLabel { get; }
Property Value
HelpText
Optional tooltip, displayed if a label is also displayed
public virtual string? HelpText { get; }
Property Value
IsEditable
public virtual bool IsEditable { get; }
Property Value
IsValid
public virtual bool IsValid { get; }
Property Value
IsVisible
True if the field should be displayed
public virtual bool IsVisible { get; }
Property Value
Label
Caption to display alongside the field content
public string Label { get; }
Property Value
Rules
protected IEnumerable<Rule<T>> Rules { get; }
Property Value
- IEnumerable<Rule<T>>
Surface
public ISurface Surface { get; }
Property Value
Tag
public string? Tag { get; set; }
Property Value
Text
Text summary of the field's value (for on screen summaries)
public virtual string Text { get; }
Property Value
Value
The lensed value which this field is modelling
public abstract T Value { get; set; }
Property Value
- T
Methods
AddRule(Rule<T>, bool)
public void AddRule(Rule<T> r, bool mayHaveDependencies)
Parameters
ClearRules()
public void ClearRules()
Invalidate()
Update the current value on the form, unless it has not been saved to the model, and perform validation
public void Invalidate()
OnRulesChanged()
protected virtual void OnRulesChanged()
SetViewFromModelAndNotify()
public void SetViewFromModelAndNotify()
Validate()
public override string? Validate()