I am using SfNumericTextbox but cannot handle formatting.
I've written a helper and it works for label somehow, doesn't work for numerictextbox
What I want is to put;
- comma as decimal delimiter,
- dot as thousand delimiter
- (optionally) binded symbol for currency
Sample result I want to achieve; 1.500,25 ₺
<inputLayout:SfTextInputLayout
Hint="Budget"
ContainerType="Outlined"
ReserveSpaceForAssistiveLabels="False">
<numericBox:SfNumericTextBox Value="{Binding BudgetAmount, Mode=TwoWay, Converter={StaticResource numericLabelFormatConverter}}" />
</inputLayout:SfTextInputLayout>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
double amount = System.Convert.ToDouble(value);
return Math.Round(amount, 0).ToString("N0", new CultureInfo("tr-TR"));
}
Thanks in advance for your kindly support.