O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required