Class ItemViewModelBase
Based on Microsoft.Internal.GamesTest.BugAnywhere.BugAnywhereObject This is the base implementation for all items in the Aruba View Model, it provides basic capabilities for Property changes and error notification.
Inherited Members
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public abstract class ItemViewModelBase : BindableBase, INotifyPropertyChanged, IDataErrorInfo
Constructors
View SourceItemViewModelBase(bool)
Initializes a new instance of the ItemViewModelBase class.
Declaration
protected ItemViewModelBase(bool canEdit)
Parameters
Type | Name | Description |
---|---|---|
bool | canEdit | Whether this object can be edited. |
Properties
View SourceCanEdit
Gets a value indicating whether this object can be edited.
Declaration
public virtual bool CanEdit { get; }
Property Value
Type | Description |
---|---|
bool |
Error
Gets or sets the error message for the object.
Declaration
public string Error { get; protected set; }
Property Value
Type | Description |
---|---|
string |
HasError
Gets or sets a value indicating whether this object has an error.
Declaration
public virtual bool HasError { get; protected set; }
Property Value
Type | Description |
---|---|
bool |
IsDirty
Gets or sets a value indicating whether this object has been edited without being saved.
Declaration
public bool IsDirty { get; protected set; }
Property Value
Type | Description |
---|---|
bool | A value indicating whether this object has been edited without being saved. |
this[string]
Retrieves an error message for the specified property.
Declaration
public string this[string columnName] { get; }
Parameters
Type | Name | Description |
---|---|---|
string | columnName | The property to retrieve the error message for. |
Property Value
Type | Description |
---|---|
string | An error message. |
Methods
View SourceMarkAllPropertiesAsValid()
Marks all properties as valid.
Declaration
protected void MarkAllPropertiesAsValid()
MarkPropertyAsInvalid(string, string)
Marks a property as invalid.
Declaration
protected void MarkPropertyAsInvalid(string propertyName, string message)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | The name of the property. |
string | message | The error message. |
MarkPropertyAsValid(string)
Marks a property as valid.
Declaration
protected void MarkPropertyAsValid(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | The name of the property. |