Domanda

I keep running into this increasingly annoying nuance when using a RadMaskedTextBox wherein once the field gains focus, the cursor doesn't seem to position itself at the beginning of the field. Instead I get something like this;

enter image description here

Which would come from for example, the code below. Notice in the example the cursor starts 7 spaces from the beginning of the field. Which is exactly the number of #'s I have set in my Mask to allow numeric input of 7 characters as shown below.

<telerik:RadMaskedTextBox 
         Value="{Binding Path=Parameters.Blah, Mode=TwoWay}" 
         MaskType="Standard"
         Placeholder=""
         Mask="#######"/>

How can I get the cursor back to the beginning of the field when it receives focus while keeping my numeric input length? I have the suspicion I'm missing an inane detail here. Thanks in advance.

È stato utile?

Soluzione

I'm not sure what you're asking for... but if you just want to get the cursor in the beginning of the radmaskedtextbox on focus (once you are focused, you can click wherever in the textbox to move the cursor) you should use this property:

SelectionOnFocus="CaretToBeginning" 
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top