Skip to content

Instantly share code, notes, and snippets.

@moswald
Created July 17, 2015 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moswald/09322b244b4ccbcd4614 to your computer and use it in GitHub Desktop.
Save moswald/09322b244b4ccbcd4614 to your computer and use it in GitHub Desktop.
<x:Int32 x:Key="HubHeaderCharacterSpacing">-22</x:Int32>
<x:Double x:Key="HubHeaderFontSize">78</x:Double>
<FontFamily x:Key="PhoneFontFamilyNormal">Segoe WP</FontFamily>
<Thickness x:Key="HubHeaderMarginThickness">15,1,0,0</Thickness>
<Style x:Key="HubStyle1" TargetType="Hub">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Hub">
<Grid x:Name="HubRoot">
<Grid.Projection>
<PlaneProjection x:Name="EntranceAnimationProjection"/>
</Grid.Projection>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="BackgroundImageLoadStates">
<VisualState x:Name="BackgroundHidden">
<Storyboard>
<FadeOutThemeAnimation Storyboard.TargetName="Background"/>
</Storyboard>
</VisualState>
<VisualState x:Name="BackgroundImageFadingIn">
<Storyboard>
<FadeInThemeAnimation Storyboard.TargetName="Background"/>
</Storyboard>
</VisualState>
<VisualState x:Name="BackgroundShowing">
<Storyboard>
<DoubleAnimation To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Canvas Grid.RowSpan="2">
<Canvas.Clip>
<RectangleGeometry x:Name="BackgroundClipRect"/>
</Canvas.Clip>
<Grid x:Name="Background">
<Grid.RenderTransform>
<CompositeTransform x:Name="BackgroundParallaxTransform"/>
</Grid.RenderTransform>
<Border x:Name="WrapBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<Border.RenderTransform>
<CompositeTransform x:Name="WrapBackgroundParallaxTransform"/>
</Border.RenderTransform>
</Border>
<Border x:Name="MainBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
</Grid>
</Canvas>
<ScrollViewer x:Name="ScrollViewer" HorizontalScrollMode="Auto" HorizontalSnapPointsType="None" HorizontalAlignment="Left" HorizontalScrollBarVisibility="Hidden" Grid.RowSpan="2" Template="{StaticResource ScrollViewerScrollBarlessTemplate}" VerticalScrollBarVisibility="Disabled" VerticalScrollMode="Disabled" ZoomMode="Disabled">
<ItemsStackPanel x:Name="Panel" CacheLength="6" Orientation="{TemplateBinding Orientation}"/>
</ScrollViewer>
<Canvas Grid.Row="0">
<Canvas.Clip>
<RectangleGeometry x:Name="HeaderClipRect"/>
</Canvas.Clip>
<ContentControl x:Name="HeaderHost" CharacterSpacing="{StaticResource HubHeaderCharacterSpacing}" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" FontWeight="Light" FontSize="{StaticResource HubHeaderFontSize}" FontFamily="{StaticResource PhoneFontFamilyNormal}" Margin="{StaticResource HubHeaderMarginThickness}">
<ContentControl.RenderTransform>
<TransformGroup>
<CompositeTransform x:Name="HeaderParallaxTransform"/>
<TranslateTransform x:Name="HeaderFlyinFlyoutTransform"/>
</TransformGroup>
</ContentControl.RenderTransform>
</ContentControl>
</Canvas>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment