How to lock hub just like in pivot RRS feed

  • Question

  • How to lock hub just like in pivot?

    Is there any equivalent code to "Pivot.IsLocked"

    Friday, March 27, 2015 11:07 PM


  • Hi zFunx,

    As far as I known when we use the Pivot.IsLocked property, the Pivot control will lock to the current pivot item, other pivot items will disappear. In the Hub control, it does not have this property, maybe we can implement it by modifying the Visibility of the HubSelection, the following is a simple code snippet, please try to check it:

    private void MyHub_Loaded(object sender, RoutedEventArgs e)
                foreach (HubSection test in MyHub.Sections)
                    if (test.Header.Equals("HubSection 0"))
                        test.Visibility = Visibility.Visible;
                    else test.Visibility = Visibility.Collapsed;

    Best Regards,
    Amy Peng

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by zFunx Thursday, April 2, 2015 3:50 AM
    Monday, March 30, 2015 9:31 AM