Table of Contents

Class FieldBase<T>

Namespace
The.WPF.Fields
Assembly
Instagile.WPF.dll
[JsonConverter(typeof(FieldJsonConverter))]
public abstract class FieldBase<T> : FieldBase, IField<T>, IField, IModel, INotifyPropertyChanged, IDataErrorInfo

Type Parameters

T
Inheritance
FieldBase<T>
Implements
Derived
Inherited Members
Extension Methods

Constructors

FieldBase(ISurface, string, string)

protected FieldBase(ISurface surface, string label, string @namespace)

Parameters

surface ISurface
label string
namespace string

Fields

Logger

protected readonly ILogger Logger

Field Value

ILogger

Principal

protected readonly IPrincipal Principal

Field Value

IPrincipal

Services

protected readonly IServices Services

Field Value

IServices

Properties

Content

Templated field content

public virtual IField Content { get; }

Property Value

IField

HasChanges

public abstract bool HasChanges { get; }

Property Value

bool

HasLabel

True if the field should be labelled inline

public virtual bool HasLabel { get; }

Property Value

bool

HelpText

Optional tooltip, displayed if a label is also displayed

public virtual string? HelpText { get; }

Property Value

string

IsEditable

public virtual bool IsEditable { get; }

Property Value

bool

IsValid

public virtual bool IsValid { get; }

Property Value

bool

IsVisible

True if the field should be displayed

public virtual bool IsVisible { get; }

Property Value

bool

Label

Caption to display alongside the field content

public string Label { get; }

Property Value

string

Rules

protected IEnumerable<Rule<T>> Rules { get; }

Property Value

IEnumerable<Rule<T>>

Surface

public ISurface Surface { get; }

Property Value

ISurface

Tag

public string? Tag { get; set; }

Property Value

string

Text

Text summary of the field's value (for on screen summaries)

public virtual string Text { get; }

Property Value

string

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

r Rule<T>
mayHaveDependencies bool

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()

Returns

string