This is a migrated thread and some comments may be shown as answers.

cursor position in autocompletebox

2 Answers 173 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Abhi
Top achievements
Rank 1
Abhi asked on 25 Dec 2012, 07:22 AM
Hi,
        When I select an item from the autocomplete box, the text displayed in the box is the last portion of the text. I would like to display the first portion instead.(i.e,...pointing the cursor to the start of the text in mvvm pattern)  

2 Answers, 1 is accepted

Sort by
0
sanjay
Top achievements
Rank 1
answered on 31 Dec 2012, 11:49 AM
Hi Abhi

Find the textbox of autocompletebox through visual tree helper.

Textbox txt= VisualTreeHelper.GetChild(VisualTreeHelper.GetChild("AutoCompleteBoxName", 0), 0) as TextBox;

txt.select(0,0)   wii place cursor position at first letter always.


http://stackoverflow.com/questions/1049657/how-to-access-the-textbox-in-a-sl3-autocompletebox


Regards
Sanjay
0
Abhi
Top achievements
Rank 1
answered on 02 Jan 2013, 06:42 AM
thanks sanjay,
I got it
Tags
AutoCompleteBox
Asked by
Abhi
Top achievements
Rank 1
Answers by
sanjay
Top achievements
Rank 1
Abhi
Top achievements
Rank 1
Share this question
or