Just copy paste the following code in your helper class/ project.
This number text box can handle whole numbers and decimal numbers.
using System.Windows.Controls;
using System.Windows.Input;
using System.Text.RegularExpressions;
namespace Ravi.UI.Silverlight
{
///
///
public class NumericTextBox : TextBox
{
#region Properties
///
///
public int DecimalPlaces { get; set; }
///
///
public bool AllowDecimal { get; set; }
#endregion
#region Methods
///
///
///
private bool HasDecimal()
{
return this.Text.Contains(“.”);
}






