We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Initial value


For some reason when I load up any of my pages the numeric text boxes do not show the value with the correct format until I click on the box and enter a new value.
However if I set the culture of the text box the it displays the formatting but no longer shows a value of 0 in the box.
Here is an example of my XAML:

<sync:SfNumericTextBox Header="Cost:" Text="{x:Bind ViewModel.Marketing.Cost, Mode=TwoWay, Converter={StaticResource StringToDouble}}" FormatString="C" Culture="{x:Bind ViewModel.culture}" InputScope="Number"/>

The same issue occurs with the percentage format.
It seems strange as I haven't made any changes to these controls but they are no longer working as they did yesterday.
I even rolled back my code to check and it still doesn't work.



5 Replies

PB Priyanga Balasubramaniam Syncfusion Team September 15, 2016 01:05 PM UTC

Hi Francis,

Thank you for Contacting Syncfusion Support.

We have checked your query, but we could not reproduce the issue at our end. Can you update us the version number which you have upgraded and also the old version you have used? If possible, please provide the sample to reproduce the issue which could help us to proceed further on this.

Priyanga B

FR Francis September 15, 2016 02:32 PM UTC


I have done some more testing and found something interesting.

<sync:SfNumericTextBox Header="Cost:"  Text="{x:Bind ViewModel.test, Mode=TwoWay, Converter={StaticResource StringToDouble}}" Culture="{x:Bind ViewModel.culture}" FormatString="C" InputScope="Number"/>

Results in a value of £0.00 regardless of what value is set during the binding and only shows the a value in the £ format once a new value is entered.

<sync:SfNumericTextBox Header="Cost:" Culture="{x:Bind ViewModel.culture}" Text="{x:Bind ViewModel.test, Mode=TwoWay, Converter={StaticResource StringToDouble}}" FormatString="C"  InputScope="Number"/>

This code fixes this issue as the culture is set before the value binding of the text box so the value now appears in the text box unformatted e.g a value of 300 appears as 300 instead of £300.00. Again once a new value is entered the value is formatted correctly.
I tried to put the format string before the value binding however this had no effect.

I then tried using the Value property instead of Text:

<sync:SfNumericTextBox Header="Cost:" Culture="{x:Bind ViewModel.culture}"   Value="300" FormatString="C"  InputScope="Number"/>

This worked properly with the value being formatted as £300.00 when the page loaded.
The issue now however when I try to use Binding to value it doesn't work and using x:Bind makes the value property report that the "input is not in the correct format" in the designer.
Is there a way I can two way bind to the value property then I believe the issue would be resolved?
It is strange however that it the value bound to the text property was being was working until yesterday morning although I did perform an update for visual studio to version 14.025420.1 and syncfusion updated to on the 12th, but the numeric text boxes were behaving as normal afterwards and the following day.
I'm using Windows 10 anniversary edition but my app is targeting 10586 as that is the version of the phone emulator I am testing with.



MS Mariappan S Syncfusion Team September 19, 2016 12:25 PM UTC

Hi Francis, 

We were able to reproduce the issue and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates 

Please let me know if you have any questions. 

Mariappan S 

EP Eduardo Padilla October 8, 2016 05:00 PM UTC


Any news about this issue? I am having a similar problem where the percentage sign only shows after editing the field. Additionally, the binding does not work, no matter why I enter in the textbox it does not change value in the model. Yes, I am implementing INotifyPropertyChanged.

<my2:SfNumericTextBox x:Name="txtRate"  
                      Value="{Binding Merchant.Rate, Mode=TwoWay}"/>

The field is defined as a nullable decimal.


Eduardo P.

PB Priyanga Balasubramaniam Syncfusion Team October 10, 2016 01:05 PM UTC

Hi Eduardo,

Query#1:"I am having a similar problem where the percentage sign only shows after editing the field"

We have checked your query percentage sign appears after editing the field. This is behavior only.

Query#2:"the binding does not work, no matter why I enter in the textbox it does not change value in the model"

We have checked our SfNumericTextBox control based on the code provided in your last update and we were unable to reproduce the reported behavior from our side. From your code, we suspect that you may not include the “UpdateSourceTrigger as PropertyChanged” while binding the value. We have prepared sample for your reference and it can be downloaded from the below location

Sample : SfNumericTextBoxBind 

Please let us know, if we misunderstood your query. If so, can you please provide the more details about the reported behavior which helps us to provide the solution at earliest.

Priyanga B

Live Chat Icon For mobile
Up arrow icon