Search Results for

    Show / Hide Table of Contents

    Class DefaultValueInverter

    Class that inverts a value. Supports inversion of Byte, Int32, Double, Decimal, Single, Boolean and Visibility.

    This class can be used with the InvertExtension.

    Inheritance
    Object
    DefaultValueInverter
    Implements
    IValueInverter
    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.Wpf.dll
    Syntax
    public class DefaultValueInverter : IValueInverter
    Remarks

    The DefaultValueInverter will check if the value is of type string. The string representation is then converted to the native type, inverted and then converted back to string using the provided ToString() implementation provided by the native type.

    Methods

    | Improve this Doc View Source

    InvertValue(Object)

    Throws an exception if operation has failed.

    Declaration
    public object InvertValue(object value)
    Parameters
    Type Name Description
    Object value
    Returns
    Type Description
    Object

    The inverted value.

    Exceptions
    Type Condition
    InvalidOperationException
    | Improve this Doc View Source

    TryInvertValue(Object, out Object)

    Trys to invert a value. Won't throw an exception if operation fails.

    Declaration
    public bool TryInvertValue(object value, out object invertedValue)
    Parameters
    Type Name Description
    Object value
    Object invertedValue
    Returns
    Type Description
    Boolean

    true when successful, otherwise false

    Implements

    IValueInverter

    Extension Methods

    HelperExtensionsCommon.ToDictionary(Object)
    HelperExtensionsCommon.ToFlatDictionary(Object)

    See Also

    InvertExtension
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX