C# Class ERP.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
Afficher le fichier Open project: arthurgfonseca/ERP-Grupo5

Méthodes publiques

Méthode 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 méthode

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).
Résultat object

ConvertBack() public méthode

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).
Résultat object