This might be a very simple question.
How do I make sure that double will have number style in following format?
03.00, 02.04
if i Set
double foo=1;
variable foo should have number format 01.00.
if i set
foo = 2.5
it should have value 02.50
Implementaion I have bound foo property to silverlight textbox through MVVM model.
I want to textbox to display number in 00.00 format always .
If you are using silverlight version 4.0 check this tutorial
Formatting made easy – Silverlight 4
You need to specify the string formate as shown in below example
Also check : Custom Numeric Format Strings on msdn