c# - WinRT decimal to string formatting -
i have decimal value need display in xaml.
the problem win rt not support stringformat
in xaml.
i trying use converter then:
public class decimaltocurrencyconverter : ivalueconverter { public object convert(object value, type targettype, object parameter, string language) { if (value decimal) { return value.tostring("c2", system.globalization.cultureinfo.currentculture); } } public object convertback(object value, type targettype, object parameter, string language) { throw new notimplementedexception(); } }
the problem above approach not work.
what need convert numbers like:
1234.78
1.234,78
or 1 234.78
or 1 234,78
depending on parameters
how can in winrt?
thank you!
try understand here. numberformatting supporting in winrt/
https://msdn.microsoft.com/en-us/library/windows/apps/windows.globalization.numberformatting.aspx
Comments
Post a Comment