Show / Hide Table of Contents

Class FieldViewModel

Represents a BugAnywhere field.

Inheritance
object
BindableBase
ItemViewModelBase
FieldViewModel
Implements
INotifyPropertyChanged
IDataErrorInfo
Inherited Members
ItemViewModelBase.CanEdit
ItemViewModelBase.Error
ItemViewModelBase.HasError
ItemViewModelBase.IsDirty
ItemViewModelBase.this[string]
ItemViewModelBase.MarkAllPropertiesAsValid()
ItemViewModelBase.MarkPropertyAsInvalid(string, string)
ItemViewModelBase.MarkPropertyAsValid(string)
BindableBase.SetProperty<T>(ref T, T, string)
BindableBase.SetProperty<T>(ref T, T, Action, string)
BindableBase.RaisePropertyChanged(string)
BindableBase.OnPropertyChanged(PropertyChangedEventArgs)
BindableBase.PropertyChanged
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class FieldViewModel : ItemViewModelBase, INotifyPropertyChanged, IDataErrorInfo

Constructors

View Source

FieldViewModel(bool, TemplateFieldDefinition, TemplateFieldDefinition, TemplateViewModel, Guid, Tokenizer, IEnumerable<object>, bool, bool)

Initializes a new instance of the FieldViewModel class.

Declaration
public FieldViewModel(bool canEdit, TemplateFieldDefinition fieldDefinition, TemplateFieldDefinition defaultFieldDefinition, TemplateViewModel templateViewModel, Guid bugResolveGuid, Tokenizer tokenizer, IEnumerable<object> validValues, bool isArrayField, bool inDesignMode)
Parameters
Type Name Description
bool canEdit

The field can be edited.

TemplateFieldDefinition fieldDefinition

The template field definition.

TemplateFieldDefinition defaultFieldDefinition

The default template field definition.

TemplateViewModel templateViewModel

The template view model.

Guid bugResolveGuid

The id of the bug that this field is associated with.

Tokenizer tokenizer

The tokenizer.

IEnumerable<object> validValues

The only valid values allowed for this field.

bool isArrayField

Indicates if the field is an array field.

bool inDesignMode

Indicates if the field is in design mode.

Properties

View Source

ClearOnSave

Gets or sets a value indicating whether the field should be cleared when a bug is saved.

Declaration
public bool ClearOnSave { get; set; }
Property Value
Type Description
bool
View Source

DataType

Gets a value indicating the field value's DataType.

Declaration
public Type DataType { get; }
Property Value
Type Description
Type
View Source

DefaultPrivateTemplateValue

Gets or sets the default private template value of the field.

Declaration
public string DefaultPrivateTemplateValue { get; set; }
Property Value
Type Description
string
View Source

DefaultValue

Gets or sets the default value of the field.

Declaration
public string DefaultValue { get; set; }
Property Value
Type Description
string
View Source

DisplayName

Gets the display name of the field.

Declaration
public string DisplayName { get; }
Property Value
Type Description
string
View Source

FieldComparer

Gets the field comparer.

Declaration
public static Comparer<TemplateFieldDefinition> FieldComparer { get; }
Property Value
Type Description
Comparer<TemplateFieldDefinition>
View Source

IsArrayField

Gets a value indicating whether this is an array field.

Declaration
public bool IsArrayField { get; }
Property Value
Type Description
bool
View Source

IsDisplayed

Gets or sets a value indicating whether the field has been displayed.

Declaration
public bool IsDisplayed { get; set; }
Property Value
Type Description
bool
View Source

IsFromParent

Gets a value indicating whether this field is from a parent.

Declaration
public bool IsFromParent { get; }
Property Value
Type Description
bool
View Source

IsHtml

Gets or sets a value indicating whether the field displays as html.

Declaration
public bool IsHtml { get; set; }
Property Value
Type Description
bool
View Source

IsRequiredByDefault

Gets a value indicating whether this field is required by default (mandated by the IBugServiceClient).

Declaration
public bool IsRequiredByDefault { get; }
Property Value
Type Description
bool
View Source

IsRichText

Gets or sets a value indicating whether the field displays as RichText.

Declaration
public bool IsRichText { get; set; }
Property Value
Type Description
bool
View Source

IsValueLimited

Gets a value indicating whether the value for this field is restricted to be within a given range. If this is true, ValidValues specifies the range of possible values.

Declaration
public bool IsValueLimited { get; }
Property Value
Type Description
bool
View Source

Name

Gets the name of the field.

Declaration
public string Name { get; }
Property Value
Type Description
string
View Source

OverrideParent

Gets or sets a value indicating whether to override the parent value of this field.

Declaration
public bool OverrideParent { get; set; }
Property Value
Type Description
bool
View Source

ParentName

Gets the name of the parent field that is populating this field.

Declaration
public string ParentName { get; }
Property Value
Type Description
string
View Source

ResolvedValue

Gets or sets the value of the field.

Declaration
public object ResolvedValue { get; set; }
Property Value
Type Description
object
View Source

SelectableValues

Gets the selectable values for the field.

Declaration
public List<SelectableItem<object>> SelectableValues { get; }
Property Value
Type Description
List<SelectableItem<object>>
View Source

TextBoxFlowDocument

Gets or sets a value for the text box flow document.

Declaration
public FlowDocument TextBoxFlowDocument { get; set; }
Property Value
Type Description
FlowDocument
View Source

ToolTip

Gets or sets the tool tip (helper text).

Declaration
public string ToolTip { get; set; }
Property Value
Type Description
string
View Source

UrgencyLevel

Gets or sets the urgency level of the field.

Declaration
public UrgencyLevel UrgencyLevel { get; set; }
Property Value
Type Description
UrgencyLevel
View Source

ValidValues

Gets or sets the range of possible values for this field. If this is null, the value is not restricted by this.

Declaration
public IEnumerable<object> ValidValues { get; set; }
Property Value
Type Description
IEnumerable<object>

Methods

View Source

AreAllTokenizedItemsValid()

Checks if all tokenized items are valid.

Declaration
public bool AreAllTokenizedItemsValid()
Returns
Type Description
bool

Returns if tokenized items are valid.

View Source

CheckAndJoinResolvedTokens()

If this has tokenized items, join those together.

Declaration
public string CheckAndJoinResolvedTokens()
Returns
Type Description
string

The resolved token value.

View Source

GetSortedTokenizedItemsFromFields(IEnumerable<FieldViewModel>)

Utility to get tokenized items from the given fields, and sort them by resolver type, but within each resolver type, preserve original order in which the tokens were encountered in the fields.

Declaration
public static List<TokenizedItemViewModel> GetSortedTokenizedItemsFromFields(IEnumerable<FieldViewModel> fields)
Parameters
Type Name Description
IEnumerable<FieldViewModel> fields

The fields to retrieve tokens from.

Returns
Type Description
List<TokenizedItemViewModel>

The list of tokenized items.

View Source

GetTypedResolvedValue(string)

If the Field's backing type is not a string, this method tries to convert the string value to the right type before setting the field's Resolved value. Otherwise this will just set the value.

Declaration
public object GetTypedResolvedValue(string value)
Parameters
Type Name Description
string value

The resolved value of this field (tokens replaced).

Returns
Type Description
object

The typed version of ResolvedValue.

View Source

ToString()

Returns name of Field.

Declaration
public override string ToString()
Returns
Type Description
string

Name of Field.

Overrides
object.ToString()

Implements

INotifyPropertyChanged
IDataErrorInfo
  • View Source
In this article
Back to top Generated by DocFX