Partager via


MathConverter Class

Definition

The base class for a converter that performs mathematical operations on its inputs.

public ref class MathConverter abstract : System::Windows::Data::IMultiValueConverter, System::Windows::Data::IValueConverter
public abstract class MathConverter : System.Windows.Data.IMultiValueConverter, System.Windows.Data.IValueConverter
type MathConverter = class
    interface IValueConverter
    interface IMultiValueConverter
Public MustInherit Class MathConverter
Implements IMultiValueConverter, IValueConverter
Inheritance
MathConverter
Derived
Implements

Remarks

If any of the inputs are strings, they will be converted to doubles using the InvariantCulture. If the string cannot be converted using the InvariantCulture, it will be converted to a double using the culture parameter passed to Convert. If the string cannot be converted using the given culture, then it will be converted to Double.NaN.

Constructors

MathConverter()

Properties

DefaultValue

The value to use for ConvertOverride(IEnumerable<Double>) if one is not provided

Methods

ConvertOverride(IEnumerable<Double>)

Performs a mathematical operation on all the elements of values

Explicit Interface Implementations

IMultiValueConverter.Convert(Object[], Type, Object, CultureInfo)

Returns the result of a math operation on all the elements in values, as well as parameter (if provided).

IMultiValueConverter.ConvertBack(Object, Type[], Object, CultureInfo)
IValueConverter.Convert(Object, Type, Object, CultureInfo)

Returns the result of a math operation on value and parameter.

IValueConverter.ConvertBack(Object, Type, Object, CultureInfo)

Applies to