HubSections

The content inside a HubSection is a bit special. Instead of a Content property, HubSection only has a ContentTemplate property. This means you must wrap your XAML for each HubSection inside a DataTemplate element. The following XAML shows the unabridged Hub used in the previous figures. The setting of ContentTemplate is implicit because it is HubSection’s content property in the XAML sense:

<Page ...>  <Hub Header="Other Controls">    <HubSection MinWidth="750">      <HubSection.Background>        <ImageBrush ImageSource="Assets/HeroImage.jpg" Stretch="UniformToFill"/>      </HubSection.Background>    </HubSection>    <HubSection Header="Range Controls" Background="#F15A21" MinWidth="300">      <DataTemplate ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.