Search Results for

    Show / Hide Table of Contents

    Class InvertExtension

    XAML extension to invert the Value property using the current IValueInverter. Supports every MarkupExtension e.g., BindingBase.

    Inheritance
    Object
    MarkupExtension
    InvertExtension
    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 InvertExtension : MarkupExtension
    Examples

    Provide the value locally or via data binding:

    <TextBox Text="{Invert True}" /> // returns: False
    <TextBox Text="{Invert 12}" /> // returns: -12
    <TextBox Text="{Invert {x:Static Visibility.Hidden}}" /> // returns: Visibility.Visible
    <TextBox Text="{Invert {Binding TextValue}}" />

    Constructors

    | Improve this Doc View Source

    InvertExtension()

    Default constructor.

    Declaration
    public InvertExtension()
    | Improve this Doc View Source

    InvertExtension(Object)

    Constructor.

    Declaration
    public InvertExtension(object value)
    Parameters
    Type Name Description
    Object value

    Any value that can be converted by the provided ValueInverter. Can be any MarkupExtension like BindingBase that can provide a valid value.

    Properties

    | Improve this Doc View Source

    Mode

    The inversion mode.

    Declaration
    public InversionMode Mode { get; set; }
    Property Value
    Type Description
    InversionMode

    A value of InversionMode.

    | Improve this Doc View Source

    Value

    The Value to invert. Can everything that the provided ValueInverter can invert. The value can also be a BindingBase or any other MarkupExtension that can provide the invertible value.

    Declaration
    public object Value { get; set; }
    Property Value
    Type Description
    Object

    The value to invert.

    | Improve this Doc View Source

    ValueInverter

    The implementation of IValueInverter.

    Declaration
    public IValueInverter ValueInverter { get; set; }
    Property Value
    Type Description
    IValueInverter

    An implementation of IValueInverter to ise for the conversion.

    Methods

    | Improve this Doc View Source

    GetValueToInvertFromMarkupExtension(MarkupExtension, IServiceProvider)

    Extracts the value from a MarkupExtension.

    Declaration
    protected object GetValueToInvertFromMarkupExtension(MarkupExtension wrappedMarkupExtension, IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    MarkupExtension wrappedMarkupExtension

    The MarkupExtension to extract the value form.

    IServiceProvider serviceProvider

    The instance of the IServiceProvider which was passed to the ProvideValue(IServiceProvider) override.

    Returns
    Type Description
    Object

    The value of wrappedMarkupExtension.

    | Improve this Doc View Source

    ProvideValue(IServiceProvider)

    Declaration
    public override object ProvideValue(IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    IServiceProvider serviceProvider
    Returns
    Type Description
    Object
    Overrides
    MarkupExtension.ProvideValue(IServiceProvider)

    Extension Methods

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

    See Also

    See advanced example
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX