How to get the index of the current selected HubSection in a Hub?


  • If there are 5 HubSection items in a Hub control, the user scrolls to the 3rd one, then how to get the current selected index of the current HubSection?
    Wednesday, October 08, 2014 6:52 AM


  • use the SectionsInView property. There isn't a just one selected index. You can use a construction like this to figure out where you are:

    if (h.SectionsInView.Contains(h.Sections[3]))

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Wednesday, October 08, 2014 7:05 AM