SetFocusedElementType on LongListSelector

Thread is closed for posting
3 posts, 1 answers
  1. Ryan
    Ryan avatar
    21 posts
    Member since:
    Apr 2013

    Posted 06 Jun 2014 Link to this post

    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(???));

  2. Answer
    Ves avatar
    2926 posts

    Posted 11 Jun 2014 Link to this post

    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,

    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.

  3. Ryan
    Ryan avatar
    21 posts
    Member since:
    Apr 2013

    Posted 17 Jun 2014 in reply to Ves Link to this post

    Thanks Ves, this is perfect.
Back to Top