How to avoid autoselect when textbox has focus in windows phone sdk 7.1? -


let's have textbox number 123.456 (inputscope="number")

when gets focus, after tapped it, 456 autoselected.

i can't see property cancel this. there hidden way ?

you deselect whenever selection made handling selectionchanged event. example

private void mytextbox_selectionchanged(object sender, routedeventargs e) {     //get position user clicked     int start = mytextbox.selectionstart;      //detach event handler it's not fired when clear selection     mytextbox.selectionchanged -= mytextbox_selectionchanged;      //clear selection keep cursor in place would've been     mytextbox.select(start, 0);      //reattach handler     mytextbox.selectionchanged += mytextbox_selectionchanged; } 

this should prevent text being selected. actual position user tapped within textbox, can handle tap event , use getposition() method of gestureeventargs parameter passed.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -