Pivot.xaml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:primitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone"
  7. xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  8. mc:Ignorable="d">
  9. <SolidColorBrush x:Key="PivotBackground" Color="#0092FF"/>
  10. <Style x:Key="PivotStyle" TargetType="phone:Pivot">
  11. <Setter Property="Margin" Value="0"/>
  12. <Setter Property="Padding" Value="0"/>
  13. <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
  14. <Setter Property="Background" Value="Transparent"/>
  15. <Setter Property="ItemsPanel">
  16. <Setter.Value>
  17. <ItemsPanelTemplate>
  18. <Grid/>
  19. </ItemsPanelTemplate>
  20. </Setter.Value>
  21. </Setter>
  22. <Setter Property="Template">
  23. <Setter.Value>
  24. <ControlTemplate TargetType="phone:Pivot">
  25. <Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
  26. VerticalAlignment="{TemplateBinding VerticalAlignment}">
  27. <Grid.RowDefinitions>
  28. <RowDefinition Height="Auto"/>
  29. <RowDefinition Height="Auto"/>
  30. <RowDefinition Height="*"/>
  31. </Grid.RowDefinitions>
  32. <Grid Background="{StaticResource PivotBackground}"
  33. CacheMode="BitmapCache"
  34. Grid.RowSpan="2" />
  35. <Grid Background="{TemplateBinding Background}"
  36. CacheMode="BitmapCache"
  37. Grid.Row="2" />
  38. <ContentPresenter ContentTemplate="{TemplateBinding TitleTemplate}"
  39. Content="{TemplateBinding Title}"
  40. Margin="24,17,0,-7"/>
  41. <primitives:PivotHeadersControl x:Name="HeadersListElement"
  42. Grid.Row="1"/>
  43. <Grid Grid.Row="2">
  44. <ItemsPresenter x:Name="PivotItemPresenter"
  45. Margin="{TemplateBinding Padding}" />
  46. </Grid>
  47. </Grid>
  48. </ControlTemplate>
  49. </Setter.Value>
  50. </Setter>
  51. </Style>
  52. <Style TargetType="phone:PivotItem">
  53. <Setter Property="Margin" Value="-12, -2, 0, 0"/>
  54. </Style>
  55. </ResourceDictionary>