Click or drag to resize

UnaryOperationConverter Class

Applies the Operation on the value.

Either a boolean or an arithetic operation for built in types, or the negation defined by the objects negation operator overload.

Inheritance Hierarchy
SystemObject
  TomsToolbox.Wpf.ConvertersValueConverter
    TomsToolbox.Wpf.ConvertersUnaryOperationConverter

Namespace:  TomsToolbox.Wpf.Converters
Assembly:  TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 1.0.70.0
Syntax
public class UnaryOperationConverter : ValueConverter

Return Value

Type: 
If the conversions succeed, the result of the operation is returned. If any error occurs, the result is UnsetValue.

The UnaryOperationConverter type exposes the following members.

Constructors
  NameDescription
Public methodUnaryOperationConverter
Initializes a new instance of the UnaryOperationConverter class
Top
Properties
  NameDescription
Public propertyConvertBackErrorValue
Gets or sets the error value, which is returned whenever the value to convert back produces an error; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertBackNullValue
Gets or sets the null value, which is returned whenever the value to convert back is null; the default is null.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertBackUnsetValue
Gets or sets the unset value, which is returned whenever the value to convert back is UnsetValue; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertErrorValue
Gets or sets the error value, which is returned whenever the value to convert produces an error; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertNullValue
Gets or sets the null value, which is returned whenever the value to convert is null; the default is null.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertUnsetValue
Gets or sets the unset value, which is returned whenever the value to convert is UnsetValue; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyOperation
Gets or sets the operation performed by this converter.

Even though this converter supports only one operation, the property is present to have the same look and feel like the BinaryOperationConverter.

Top
Methods
Fields
  NameDescription
Public fieldStatic memberNegation
The default negation converter.

[NotNull]

Top
Extension Methods
  NameDescription
Public Extension MethodSafeCastT
Performs a cast from object to T, avoiding possible null violations if T is a value type.

[CanBeNull]

(Defined by ObjectExtensions.)
Top
See Also