Table of Contents

Class NullToBooleanConverter

Namespace
WindowSill.API
Assembly
WindowSill.API.dll

A value converter that converts null/non-null values to boolean values.

public class NullToBooleanConverter : IValueConverter
Inheritance
NullToBooleanConverter
Implements
Inherited Members
Extension Methods

Properties

ValueOnNotNull

Gets or sets the boolean value to return when the input value is not null. Default value is false.

public bool ValueOnNotNull { get; set; }

Property Value

bool

ValueOnNull

Gets or sets the boolean value to return when the input value is null. Default value is true.

public bool ValueOnNull { get; set; }

Property Value

bool

Methods

Convert(object, Type, object, string)

Converts a value to a boolean based on whether it is null or not.

public object Convert(object value, Type targetType, object parameter, string language)

Parameters

value object

The value to convert.

targetType Type

The type to convert to (should be bool).

parameter object

Optional parameter (not used).

language string

The language code (not used).

Returns

object

ValueOnNull if value is null, otherwise ValueOnNotNull.

ConvertBack(object, Type, object, string)

Converts a boolean value back to the original type. Not implemented.

public object ConvertBack(object value, Type targetType, object parameter, string language)

Parameters

value object

The boolean value to convert back.

targetType Type

The target type to convert to.

parameter object

Optional parameter (not used).

language string

The language code (not used).

Returns

object

Not implemented.

Exceptions

NotImplementedException

Always thrown as this method is not implemented.