ObjectToTextConverter Class |
Namespace: TomsToolbox.Wpf.Converters
The ObjectToTextConverter type exposes the following members.
Name | Description | |
---|---|---|
ObjectToTextConverter | Initializes a new instance of the ObjectToTextConverter class |
Name | Description | |
---|---|---|
ConvertBackErrorValue |
Gets or sets the error value, which is returned whenever the value to convert back produces an error; the default is UnsetValue.
(Inherited from ValueConverter.) | |
ConvertBackNullValue |
Gets or sets the null value, which is returned whenever the value to convert back is null; the default is null.
(Inherited from ValueConverter.) | |
ConvertBackUnsetValue |
Gets or sets the unset value, which is returned whenever the value to convert back is UnsetValue; the default is UnsetValue.
(Inherited from ValueConverter.) | |
ConvertErrorValue |
Gets or sets the error value, which is returned whenever the value to convert produces an error; the default is UnsetValue.
(Inherited from ValueConverter.) | |
ConvertNullValue |
Gets or sets the null value, which is returned whenever the value to convert is null; the default is null.
(Inherited from ValueConverter.) | |
ConvertUnsetValue |
Gets or sets the unset value, which is returned whenever the value to convert is UnsetValue; the default is UnsetValue.
(Inherited from ValueConverter.) | |
Key |
Gets or sets the key used to select the TextAttribute
The converter parameter can override this value.
|
Name | Description | |
---|---|---|
Convert(Object, Object) |
Converts the specified value to the text taken from it's TextAttribute | |
Convert(Object, Object, Type) |
Converts the specified value to the text taken from it's TextAttribute | |
Convert(Object, Type, Object, CultureInfo) |
Converts a value.
(Overrides ObjectToAttributeConverterTConvert(Object, Type, Object, CultureInfo).) | |
ConvertBack |
Converts a value.
(Inherited from ValueConverter.) | |
ProvideValue |
When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension.
(Inherited from ValueConverter.) |
Name | Description | |
---|---|---|
SafeCastT |
Performs a cast from object to T, avoiding possible null violations if T is a value type.
(Defined by ObjectExtensions.) |
enum Items { [Text("key2", "This is other text on item 1")] [Text("key1", "This is item 1")] Item1, [Text("key1", "This is item 2")] Item2 } Assert.Equal("This is item 1", ObjectToTextConverter.Convert("key1", Items.Item1));