C# Class RIAServiceApplication.TargetNullValueConverter

Two way IValueConverter that lets you bind a property on a bindable object that can be an empty string value to a dependency property that should be set to null in that case.
Inheritance: IValueConverter
Datei anzeigen Open project: KuduApps/RIAServicesApp

Public Methods

Method Description
Convert ( object value, Type targetType, object parameter, System culture ) : object

Converts null or empty strings to null.

ConvertBack ( object value, Type targetType, object parameter, System culture ) : object

Converts null back to String.Empty.

Method Details

Convert() public method

Converts null or empty strings to null.
public Convert ( object value, Type targetType, object parameter, System culture ) : object
value object The value to convert.
targetType System.Type The expected type of the result (ignored).
parameter object Optional parameter (ignored).
culture System The culture for the conversion (ignored).
return object

ConvertBack() public method

Converts null back to String.Empty.
public ConvertBack ( object value, Type targetType, object parameter, System culture ) : object
value object The value to convert.
targetType System.Type The expected type of the result (ignored).
parameter object Optional parameter (ignored).
culture System The culture for the conversion (ignored).
return object