Setting the focus of listboxItem on pageload in Silverlight.

Posted by Subhen on Stack Overflow See other posts from Stack Overflow or by Subhen
Published on 2010-03-19T11:15:42Z Indexed on 2010/03/20 9:41 UTC
Read the original article Hit count: 240

Filed under:

Hi, I want to set focus on the first item of the listbox , on pageload.

I can not use :

listArtist.SelectedIndex=

as I navigate to another page on selected indexChanged.

I have the following code , but it is not working:

 void Event_Completed(object sender, RMSResponseEventArgs e)
    {

        listArtist.ItemsSource = e.eOutData;
        listArtist.Focus();


    }

© Stack Overflow or respective owner

Related posts about silverlight-3.0