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

SetFocusedElementType on LongListSelector

2 Answers 29 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ryan
Top achievements
Rank 1
Ryan asked on 06 Jun 2014, 08:17 PM
Hi, I'm trying to focus on an item in the LongListSelector. However I can't figure out what parameters to use for the SetFocusedElementType, as the LongListSelector doesn't seem to have an item inside it.

RadContextMenu.SetFocusedElementType(HistoryList, typeof(???));

Thanks
Ryan

2 Answers, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 11 Jun 2014, 07:44 AM
Hi Ryan,

LongListSelector renders ContentPresenter elements within a Canvas. So you can use the method like this:

RadContextMenu.SetFocusedElementType(HistoryList, typeof(ContentPresenter));

Then in Opening event handler e.FocusedElement will hold a reference to that ContentPresenter.

Best regards,
Ves
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ryan
Top achievements
Rank 1
answered on 17 Jun 2014, 04:34 PM
Thanks Ves, this is perfect.
Tags
ContextMenu
Asked by
Ryan
Top achievements
Rank 1
Answers by
Ves
Telerik team
Ryan
Top achievements
Rank 1
Share this question
or