Click or drag to resize

ArithmeticMultiValueConverter Class

A IMultiValueConverter that performs a arithmetic operation on all items.
Inheritance Hierarchy
SystemObject
  System.Windows.MarkupMarkupExtension
    TomsToolbox.Wpf.ConvertersMultiValueConverter
      TomsToolbox.Wpf.ConvertersArithmeticMultiValueConverter

Namespace: TomsToolbox.Wpf.Converters
Assembly: TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax
[ValueConversionAttribute(typeof(Object[]), typeof(double))]
public class ArithmeticMultiValueConverter : MultiValueConverter

The ArithmeticMultiValueConverter type exposes the following members.

Constructors
 NameDescription
Public methodArithmeticMultiValueConverterInitializes a new instance of the ArithmeticMultiValueConverter class
Top
Properties
 NameDescription
Public propertyOperation Gets or sets the operation to be performed on all items.
Top
Methods
 NameDescription
Protected methodConvert Converts source values to a value for the binding target. The data binding engine calls this method when it propagates the values from source bindings to the binding target. An input value of null will return null, whereas if the input array contains UnSet then UnSet will be returned.
(Overrides MultiValueConverterConvert(Object, Type, Object, CultureInfo))
Protected methodConvertBack Converts a value.
(Inherited from MultiValueConverter)
Public methodProvideValue When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension.
(Inherited from MultiValueConverter)
Top
Fields
 NameDescription
Public fieldStatic memberAverage The default arithmetic AVERAGE converter.
Public fieldStatic memberMax The default arithmetic MAX converter.
Public fieldStatic memberMin The default arithmetic MIN converter.
Public fieldStatic memberProduct The default arithmetic PRODUCT converter.
Public fieldStatic memberSum The default arithmetic SUM converter.
Top
Extension Methods
 NameDescription
Public Extension MethodSafeCastT Performs a cast from object to T, avoiding possible null violations if T is a value type.
(Defined by ObjectExtensions)
Top
Remarks
All items must be convertible to double.
See Also