Advertisement
FrayxRulez

HamburgerMenu Style

Aug 25th, 2014
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:local="using:TestHamburger">
  5.  
  6. <Style TargetType="local:HamburgerMenu">
  7. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  8. <Setter Property="VerticalContentAlignment" Value="Stretch"/>
  9. <Setter Property="Template">
  10. <Setter.Value>
  11. <ControlTemplate TargetType="local:HamburgerMenu">
  12. <Border
  13. Background="{TemplateBinding Background}"
  14. BorderBrush="{TemplateBinding BorderBrush}"
  15. BorderThickness="{TemplateBinding BorderThickness}">
  16. <ScrollViewer VerticalScrollBarVisibility="Disabled"
  17. VerticalScrollMode="Disabled"
  18. HorizontalScrollBarVisibility="Hidden"
  19. HorizontalScrollMode="Auto"
  20. HorizontalSnapPointsType="MandatorySingle"
  21. HorizontalSnapPointsAlignment="Near"
  22. x:Name="ScrollViewer">
  23. <local:HamburgerPanel Position="{TemplateBinding Position}" Viewport="{TemplateBinding Viewport}">
  24. <ContentControl Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
  25. <ContentPresenter/>
  26. </local:HamburgerPanel>
  27. </ScrollViewer>
  28. </Border>
  29. </ControlTemplate>
  30. </Setter.Value>
  31. </Setter>
  32. </Style>
  33. </ResourceDictionary>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement