Hi, to format a DateTime, I use a converter like that :
<igDP:Field Name="Debut" Label="début" Converter="{StaticResource ResourceKey=DateValueConverter01}"> <igDP:Field.Settings> <igDP:FieldSettings EditAsType="{x:Type System:String}"/> </igDP:Field.Settings> </igDP:Field>
Now, I want to format a field with kW, A or kW/h.
Could we do that directly in XAML without using a converter ?
I don't see a FormatString Property for the igFields.
<igDP:Field Name="Calibre" Label="Calibre" Width="60" ??? ContentStringFormat="{}{0} kW" ??? />
Hello,
Thank you for your post. I have been looking into it and it seems like that the best approach is to use a Converter in order to format the Header Text, like the one you have shared. If I think of a possible solution which uses only XAML I will let you know.
Hi, I've done my StringFormatConverter :
public class StringFormatConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return string.Format(parameter.ToString(), value.ToString()); }...
<igDP:Field Name="Calibre" Label="Calibre" Width="60" Converter="{StaticResource ResourceKey=StringFormatConverter}" ConverterParameter="{}{0} kW"> <igDP:Field.Settings> <igDP:FieldSettings EditAsType="{x:Type System:String}"/> </igDP:Field.Settings> </igDP:Field>...
Thanks.
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.