Show / Hide Table of Contents

Class SettingInfo

SettingInfo class. Used primarily to pass information from the SettingsCategory objects to the Settings UI through the settings manager.

Inheritance
System.Object
SettingInfo
Implements
System.ComponentModel.IDataErrorInfo
Namespace: Phoenix.Settings
Assembly: Phoenix.Settings.dll
Syntax
public class SettingInfo : BindableBase, IDataErrorInfo

Constructors

View Source

SettingInfo(String, String, String, Object, AllowedValuesModel, SettingMetadata)

Initializes a new instance of the SettingInfo class.

Declaration
public SettingInfo(string categoryName, string settingName, string settingDisplayName, object value, AllowedValuesModel allowedValues, SettingMetadata metadata)
Parameters
Type Name Description
System.String categoryName

Name of the category.

System.String settingName

Name of the setting.

System.String settingDisplayName

Display name of the setting.

System.Object value

Value of the setting.

AllowedValuesModel allowedValues

Allowed values of the setting.

SettingMetadata metadata

the metadata for how to display in the UI and validate.

Properties

View Source

AllowedValues

Gets the allowed values of the setting.

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

CategoryName

Gets the name of the category the setting belongs to.

Declaration
public string CategoryName { get; }
Property Value
Type Description
System.String
View Source

IsDirty

Gets a value indicating whether or not the SettingsInfo object is dirty.

Declaration
public bool IsDirty { get; }
Property Value
Type Description
System.Boolean
View Source

IsValid

Gets a value indicating whether or not the setting's value is a valid value.

Declaration
public bool IsValid { get; }
Property Value
Type Description
System.Boolean
View Source

OldValue

Gets or sets the old value of the setting.

Declaration
public object OldValue { get; set; }
Property Value
Type Description
System.Object
View Source

SettingDisplayName

Gets the display name of the setting for UI purposes.

Declaration
public string SettingDisplayName { get; }
Property Value
Type Description
System.String
View Source

SettingMetadata

Gets the setting's metadata.

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

SettingName

Gets the name of the setting.

Declaration
public string SettingName { get; }
Property Value
Type Description
System.String
View Source

Value

Gets or sets the value of the setting.

Declaration
public object Value { get; set; }
Property Value
Type Description
System.Object
View Source

ValueType

Gets the type that the value is supposed to be.

Declaration
public Type ValueType { get; }
Property Value
Type Description
System.Type

Methods

View Source

TryConvertValue(out Object)

Converts a value to the correct type as specified by ValueType.

Declaration
public bool TryConvertValue(out object convertedValue)
Parameters
Type Name Description
System.Object convertedValue

the out parameter where the correctly typed value is stored or null.

Returns
Type Description
System.Boolean

a value representing whether or not the conversion was a success.

View Source

ValidateValue()

Validates the current value against the allowed values and type expectations.

Declaration
public bool ValidateValue()
Returns
Type Description
System.Boolean

Whether or not the value is valid.

Explicit Interface Implementations

View Source

IDataErrorInfo.Error

Gets a string with error information [Not used].

Declaration
string IDataErrorInfo.Error { get; }
Returns
Type Description
System.String
View Source

IDataErrorInfo.Item[String]

Gets a string with the validation errors if any.

Declaration
string IDataErrorInfo.this[string propertyName] { get; }
Parameters
Type Name Description
System.String propertyName

Name of the property to validate.

Returns
Type Description
System.String

Null if there was no error or a string indicating the error.

Implements

System.ComponentModel.IDataErrorInfo
  • View Source
In This Article
Back to top Generated by DocFX