I have used ToUpper to make capital letters in TextBox in UWP but getting issue of Cursor position in that Any other solution for it ? What I have tried: <pre>I have tried ToUpper, CharacterCasing and Typography.Capitals from which only ToUpper working other two are showing not accessible in textbox and for ToUpper i am facing problem for selectionStart posistion of cursor. <TextBox x:Name="txt_rcpname_classic" PlaceholderText="Recipient name" MaxLength="18" HorizontalAlignment="Left" Text="{Binding Path=To, Mode=TwoWay}" Grid.Column="1" Style="{StaticResource contentstyle}" TextChanging="txt_rcpname_classic_TextChanging" /> private void txt_rcpname_classic_TextChanging(TextBox sender, TextBoxTextChangingEventArgs args) { sender.Text = sender.Text.ToUpper(); sender.SelectionStart = sender.Text.Length; }
private void TextBox_TextChanging(TextBox sender, TextBoxTextChangingEventArgs args) { TextBox TBx = (TextBox)sender; int Pose = TBx.SelectionStart; TBx.Text = TBx.Text.ToUpper(); TBx.SelectionStart = Pose; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)