Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi All,

I am working in Silverlight. In my Silverlight Application there is One Textbox and One Popup with Listbox.
When i Write any text in Textbox then my popup is open But i want to extend one more thing when i press Down Arrow Key that time i want to set focus in listbox item. I have also try many thing and still i not getting any solution.

I also try this

int selectedIndex = lstRoot.SelectedIndex;
lstRoot.SelectedIndex = 0;
lstRoot.Focus();
lstRoot.SelectedIndex = selectedIndex;


Still focus is not set in lstRoot.

Please help me....!!
Posted

1 solution

Use ScrollViewer for scrolling Item and In Popup add Listbox for display items and you can easily set focus on listbox's item. for eg.

lstRoot.Focus();


It through set focus on current scrolled item and easily up and down in listbox item.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900