Search Results for

    Show / Hide Table of Contents

    Class ViewModelCommon.SetValueOptions

    Configuration objectect to configure the behavior of the property set methods.

    Inheritance
    Object
    ViewModelCommon.SetValueOptions
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: BionicCode.Utilities.Net
    Assembly: BionicCode.Utilities.Net.Common.dll
    Syntax
    public class SetValueOptions

    Constructors

    | Improve this Doc View Source

    SetValueOptions(Boolean, Boolean, Boolean)

    Declaration
    public SetValueOptions(bool isRejectInvalidValueEnabled, bool isThrowExceptionOnValidationErrorEnable, bool isRejectEqualValuesEnabled)
    Parameters
    Type Name Description
    Boolean isRejectInvalidValueEnabled

    Controls how the invalid property value is stored. Use this to ensure that the view model in a valid state. See IsRejectInvalidValueEnabled.

    Boolean isThrowExceptionOnValidationErrorEnable

    Controls if throwing an ArgumentException on a failed validation is enabled. See IsThrowExceptionOnValidationErrorEnabled.

    Boolean isRejectEqualValuesEnabled

    Controls if the equality check before setting the value is enabled. See IsRejectEqualValuesEnabled.

    Properties

    | Improve this Doc View Source

    Default

    Gets the default behavior for the property set methods.
    By default the configuration sets IsRejectEqualValuesEnabled to true, IsThrowExceptionOnValidationErrorEnabled to false and IsRejectInvalidValueEnabled to false.

    Declaration
    public static ViewModelCommon.SetValueOptions Default { get; }
    Property Value
    Type Description
    ViewModelCommon.SetValueOptions

    An instance configured with the default values.

    | Improve this Doc View Source

    IsRejectEqualValuesEnabled

    Gets if the equality check before setting the value is enabled.

    Declaration
    public bool IsRejectEqualValuesEnabled { get; }
    Property Value
    Type Description
    Boolean

    If true the equality check before setting the value to avoid raising the PropertyChanged event on equality is enabled. If false equality check is deisabled. This will always raise the PropertyChanged event.
    the default is true.

    | Improve this Doc View Source

    IsRejectInvalidValueEnabled

    Gets how the invalid property value is stored. Use this to ensure that the view model in a valid state.

    Declaration
    public bool IsRejectInvalidValueEnabled { get; }
    Property Value
    Type Description
    Boolean

    If true the invalid value is not stored to the backing field.
    The default is false.

    | Improve this Doc View Source

    IsThrowExceptionOnValidationErrorEnabled

    Gets if throwing an ArgumentException on a failed validation is enabled.
    Use this when ValidatesOnExceptions on a Binding is set to true

    Declaration
    public bool IsThrowExceptionOnValidationErrorEnabled { get; }
    Property Value
    Type Description
    Boolean

    true if throwing an ArgumentException on a failed validation is enabled. Otherwise false.
    The default is false.

    Extension Methods

    HelperExtensionsCommon.ToDictionary(Object)
    HelperExtensionsCommon.ToFlatDictionary(Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX