Ajay Gupta

Ajay Gupta

  • NA
  • 46
  • 22.8k

how To Type Uppercase String in windows phone TextBox Wpf c#

Jul 10 2015 3:23 AM
how To Type Uppercase String in windows phone TextBox Wpf c#.
 
I tried it on KeyDown Event. 
 
void TxtPanno_KeyDown(object sender, KeyEventArgs e)
{
 
TxtPanno.Text = TxtPanno.Text.ToUpper();  //1.
TxtPanno.Text= CultureInfo.CurrentCulture.TextInfo.ToUpper(TxtPanno.Text); //2.
Regex.Replace(TxtPanno.Text, "^[A-Z]", m => m.Value.ToUpper()); //3.
}
 
But Problems is that.
 
Cursor always go to leftside. 

Answers (1)