Table of Contents

Class SwitchConverter

Namespace
Acuit.Pinpoint.Windows
Assembly
Acuit.Pinpoint.Windows.dll

A value converter that converts an object, based on its Boolean state, to alternate objects.

[ValueConversion(typeof(object), typeof(object))]
public class SwitchConverter : GenericConverter<object, object, object>, IValueConverter
Inheritance
SwitchConverter
Implements
Inherited Members

Constructors

SwitchConverter()

Initializes a new instance of the SwitchConverter class.

public SwitchConverter()

Properties

ValueIfFalse

Gets or sets the object that will be returned when the source object is false.

public object ValueIfFalse { get; set; }

Property Value

object

ValueIfTrue

Gets or sets the value that will be returned when the source object is true.

public object ValueIfTrue { get; set; }

Property Value

object

Methods

Convert(object, object, CultureInfo)

Converts a value.

public override object Convert(object value, object parameter, CultureInfo culture)

Parameters

value object

The value produced by the binding source.

parameter object

The converter parameter to use.

culture CultureInfo

The culture to use in the converter.

Returns

object

A converted value. If the method returns null, the valid null value is used.

ConvertBack(object, object, CultureInfo)

Converts a value.

public override object ConvertBack(object value, object parameter, CultureInfo culture)

Parameters

value object

The value that is produced by the binding target.

parameter object

The converter parameter to use.

culture CultureInfo

The culture to use in the converter.

Returns

object

A converted value. If the method returns null, the valid null value is used.