ConvertBack Method
- Namespace
TXTextControl.WPF
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWPF. dll
Description
Converts a boolean to a value of the type specified through the targetType parameter.
Syntax
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture);Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As ObjectParameters
| Parameter | Description |
|---|---|
| value | The boolean value that is produced by the binding target. |
| targetType | The type to convert to. |
| parameter | The converter parameter to use. It must be a string representation of the value to return. If value is true this value is returned. If value is false, DependencyProperty.UnsetValue is returned. |
| culture | The culture to use in the converter. |
Return Value
The converted value. The method returns DependencyProperty.UnsetValue, if the conversion is not possible or if value is false.
Examples
The following example uses Convert Back in a focused Boolean Converter workflow.
var result = booleanConverter.ConvertBack("Approved", typeof(object), "Approved", System.Globalization.CultureInfo.GetCultureInfo("en-US"));
Console.WriteLine($"Convert Back result: {result}");Dim result = booleanConverter.ConvertBack("Approved", GetType(Object), "Approved", System.Globalization.CultureInfo.GetCultureInfo("en-US"))
Console.WriteLine($"Convert Back result: {result}")