With regular ValueConverters I can pass a parameter like this:
<TextBlock Text="{Binding Birthday,Converter={StaticResource dateconverter},ConverterParameter='dd-MMM-yyyy'}" ></TextBlock>
The XamDateTimeEditor has properties like ValueToTextConverter and ValueToDisplayTextConverter.
How would I go about passing parameters to these converters?
Hello tbremeyer,
I reviewed your issue and I believe that when you use the ValueToTextConverter or the ValueToDisplayTextConverter you don’t need explicitly to provide a converter parameter. When you set the resource for the converter like this:
<igEditors:XamDateTimeEditor.ValueToTextConverter>
<local:dateconverter />
</igEditors:XamDateTimeEditor.ValueToTextConverter>
where "dateconverter" is custom IValueConverter, by default as value of the Convert method is provided the value of the XamDateTimeEditor and as parameter is assigned the whole XamDateTimeEditor. So I believe that in your case you can set
<igEditors:XamDateTimeEditor Value=”{Binding Birthday}” Format=”dd-MMM-yyy”>
and in your custom converter you can get this value:
XamDateTimeEditor editor = parameter as XamDateTimeEditor;
MyParameter= editor.Format;
For further reference you can check the following link form our documentation:
http://help.infragistics.com/NetAdvantage/WPF/2010.3/CLR4.0/?page=InfragisticsWPF4.Editors.v10.3~Infragistics.Windows.Editors.ValueEditor~ValueToTextConverter.html
If you need any further assistance on the matter, please feel free to ask.
I am just checking have you been able to resolve your issue. If you still need any assistance with this please do not hesitate to ask.