locked
Understand how WinJS.UI.Hub, WinJS.UI.HubSection, WinJS.UI.ListView and WinJS.UI.Page work together

    General discussion

  • I recently started to convert my custom hub (based on listviews) into WinJS.UI.Hub.

    Now my page looks a bit like this:

    WinJS.UI.Hub
      WinJS.UI.HubSection
        WinJS.UI.ListView
      WinJS.UI.HubSection
        WinJS.UI.ListView
      WinJS.UI.HubSection
        WinJS.UI.ListView
      WinJS.UI.HubSection
        WinJS.UI.ListView

    Now I wan to understand when are the .winControl on each of the ListViews set? I tried to fetch them in my Pages processed handler, but the .winControl property was not yet attached.

    I understand (although its not really documented in msdn) that the Hub control loads its sections asynchronously for whatever reason. So it loads the first 2 visible sections immediately and the others a little bit later.

    Why is it doing that? And when is the correct point in time to access the .winControls that are hosted inside each HubSection?

    Tuesday, April 8, 2014 11:19 PM