locked
Hub sample available? How to create a Hub Navigation from the Standard Templates? RRS feed

  • Question

  • I wonder how you go from the VS templates to a Hub navigation? 

    Is each part of the hub a Listview or how does a hub usally work?

    Friday, June 29, 2012 6:46 PM

Answers

  • I see what you are saying Phil.  Hub is not a style of navigation.  Hub is a page used in the Hierarchial style of navigation.  The Hierarchial style navigation is what you are refering to correct?

    The GridView template is exactly what you want and is an example of this.


    Jeff Sanders (MSFT)

    Thursday, July 5, 2012 2:54 PM
    Moderator
  • That is correct on both counts.

    Jeff Sanders (MSFT)

    Friday, July 6, 2012 3:17 PM
    Moderator

All replies

  • Hi Phil,

    There is no such sample.

    -Jeff


    Jeff Sanders (MSFT)

    Monday, July 2, 2012 12:55 PM
    Moderator
  • If you haven't seen it already, there is guidance for navigation design (including the Hub page) here: http://msdn.microsoft.com/en-us/library/windows/apps/hh761500.aspx

    The Grid Application in VS is a perfect starting point for creating an application with this sort of navigation pattern. It contains a Hub page (groupedItems page), a Section page (groupDetail page) and a Detail page (itemDetail page). On the Hub page there is a single ListView where you can organize your items into groups. The other pages, deeper in the hierarchy, use different ListViews where you can add separate content.

    If you're looking for more specific information, please elaborate more on what you'd like to accomplish with the VS Templates.

    --

    Michael Booth (MSFT)

    Tuesday, July 3, 2012 12:13 AM
  • Thanks Michael, but I'm looking for something more like the news or finance app. They don't use listviews with groups as far as I can tell.

    
    Their PlatformJS code that contains the hub view is not public though.
    Tuesday, July 3, 2012 6:32 AM
  • Hi,

    As Jeff mentioned, currently there’s no sample. But base on my understanding, I would like to suggest you to embed ListView inside another ListView. The top level ListView is the hub, where each item contains a header and a child ListView.

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework

    Thursday, July 5, 2012 10:14 AM
    Moderator
  • This does not seem to be a working solution. I stand by it: If MS recommends the Hub as one of the possible landing pages for an app it should at least provide some decent standard templates for it. The listview is a complex beast event without cascading other listviews inside it.
    Thursday, July 5, 2012 2:31 PM
  • I see what you are saying Phil.  Hub is not a style of navigation.  Hub is a page used in the Hierarchial style of navigation.  The Hierarchial style navigation is what you are refering to correct?

    The GridView template is exactly what you want and is an example of this.


    Jeff Sanders (MSFT)

    Thursday, July 5, 2012 2:54 PM
    Moderator
  • Jeff, using the GridView template its not possible to build something like the News or Weather app. They use a totally different layout, mixing static pages with pages with Listviews in them in one horizontally scrollable layout that even supports semantic zoom.

    So I am not referring the navigation style but the layout style of those apps. So maybe "Hub" page was misleading in this context, of course the GridView template acts as a hub navigation, yes.

    Friday, July 6, 2012 8:28 AM
  • Phil,

    Actually that is exactly what they are using!  Note that it also supports semantic zoom.

    -Jeff


    Jeff Sanders (MSFT)

    Friday, July 6, 2012 12:24 PM
    Moderator
  • Sorry Jeff, they are using controls like PlatformJS.UI.MultisizeHorizontalGrid which is a heavily modified subclass of Listview. Semantic zoom is provided by PlatformJS.UI.MultiSizeSemanticZoom as far as I can tell from browsing through the code.

    But anyway... seems we have to roll our own once we understand the internals of ListView.

    Friday, July 6, 2012 3:16 PM
  • That is correct on both counts.

    Jeff Sanders (MSFT)

    Friday, July 6, 2012 3:17 PM
    Moderator
  • How about the Contoso News app I see references to and images of several places. Is the source available for download anywhere? I think that would be a good entrypoint for Phil and others, as it layouts the Hub page with different sources of content.

    /Peter Lindberg

    Thursday, July 19, 2012 6:48 AM