ValueToDisplayTextConverter Property

Specifies the converter used for converting between display text and value.
Public Property ValueToDisplayTextConverter As IValueConverter
public IValueConverter ValueToDisplayTextConverter {get; set;}

The conversions between the 'string' and the ValueType by default are done using built in conversion logic. You can override the default conversion logic by setting the ValueToDisplayTextConverter and Infragistics.Windows.Editors.TextEditorBase.ValueToDisplayTextConverter. ValueToDisplayTextConverter is used when the editor is in edit mode where as ValueToDisplayTextConverter is used when the editor is not in edit mode.

Note: An editor can edit values of types other than 'string'. For example, a XamTextEditor can edit values of types DateTime. You can specify the type of values being edited by the editor using the System.ValueType property.

For most situations the default conversion logic along with the Infragistics.Windows.Editors.ValueEditor.FormatProvider and Infragistics.Windows.Editors.ValueEditor.Format format properties should be sufficient in providing various formatting capabilities.

Although the built-in default conversion logic should be sufficient for most situations, you may want make use of this functionality to provide custom logic for converting value into display text. Examples where this would be needed are if you want to present a value like tomorrow and yesterday's dates as date as words 'Tomorrow' and 'Yesterday' respectively, or apply any kind of custom formatting that could not be specified using Infragistics.Windows.Editors.ValueEditor.FormatProvider and Infragistics.Windows.Editors.ValueEditor.Format property settings.


Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also