windows-phone-7 – 在扩展程序视图中删除垂直行Windows Phone 7

前端之家收集整理的这篇文章主要介绍了windows-phone-7 – 在扩展程序视图中删除垂直行Windows Phone 7前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用 Windows Phone工具包和扩展器视图.默认情况下,扩展器视图在左侧有一条垂直线,我可以删除该默认垂直线吗?谢谢
修改Expanderview样式,
  1. <Style TargetType="toolkit:ExpanderView">
  2. <Setter Property="HorizontalAlignment" Value="Stretch"/>
  3. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  4. <Setter Property="ItemsPanel">
  5. <Setter.Value>
  6. <ItemsPanelTemplate>
  7. <StackPanel/>
  8. </ItemsPanelTemplate>
  9. </Setter.Value>
  10. </Setter>
  11. <Setter Property="Template">
  12. <Setter.Value>
  13. <ControlTemplate TargetType="toolkit:ExpanderView">
  14. <Grid>
  15. <Grid.Resources>
  16. <QuadraticEase x:Key="QuadraticEaSEOut" EasingMode="EaSEOut"/>
  17. <QuadraticEase x:Key="QuadraticEaseInOut" EasingMode="EaseInOut"/>
  18. </Grid.Resources>
  19. <Grid.ColumnDefinitions>
  20. <ColumnDefinition Width="41"/>
  21. <ColumnDefinition Width="*"/>
  22. </Grid.ColumnDefinitions>
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="Auto"/>
  25. <RowDefinition Height="Auto"/>
  26. <RowDefinition Height="Auto"/>
  27. </Grid.RowDefinitions>
  28. <VisualStateManager.VisualStateGroups>
  29. <VisualStateGroup x:Name="ExpansionStates">
  30. <VisualStateGroup.Transitions>
  31. <VisualTransition From="Collapsed" GeneratedDuration="0:0:0.15" To="Expanded">
  32. <Storyboard>
  33. <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="ItemsCanvas">
  34. <EasingDoubleKeyFrame EasingFunction="{StaticResource QuadraticEaSEOut}" KeyTime="0:0:0.00" Value="0"/>
  35. <EasingDoubleKeyFrame x:Name="CollapsedToExpandedKeyFrame" EasingFunction="{StaticResource QuadraticEaSEOut}" KeyTime="0:0:0.15" Value="1"/>
  36. </DoubleAnimationUsingKeyFrames>
  37. <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ItemsCanvas"/>
  38. </Storyboard>
  39. </VisualTransition>
  40. <VisualTransition From="Expanded" GeneratedDuration="0:0:0.15" To="Collapsed">
  41. <Storyboard>
  42. <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="ItemsCanvas">
  43. <EasingDoubleKeyFrame x:Name="ExpandedToCollapsedKeyFrame" EasingFunction="{StaticResource QuadraticEaseInOut}" KeyTime="0:0:0.00" Value="1"/>
  44. <EasingDoubleKeyFrame EasingFunction="{StaticResource QuadraticEaseInOut}" KeyTime="0:0:0.15" Value="0"/>
  45. </DoubleAnimationUsingKeyFrames>
  46. <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ItemsCanvas">
  47. <EasingDoubleKeyFrame EasingFunction="{StaticResource QuadraticEaseInOut}" KeyTime="0:0:0.00" Value="1.0"/>
  48. <EasingDoubleKeyFrame EasingFunction="{StaticResource QuadraticEaseInOut}" KeyTime="0:0:0.15" Value="0.0"/>
  49. </DoubleAnimationUsingKeyFrames>
  50. <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="ItemsCanvas">
  51. <EasingDoubleKeyFrame EasingFunction="{StaticResource QuadraticEaseInOut}" KeyTime="0:0:0.00" Value="0.0"/>
  52. <EasingDoubleKeyFrame EasingFunction="{StaticResource QuadraticEaseInOut}" KeyTime="0:0:0.15" Value="-35"/>
  53. </DoubleAnimationUsingKeyFrames>
  54. </Storyboard>
  55. </VisualTransition>
  56. </VisualStateGroup.Transitions>
  57. <VisualState x:Name="Collapsed">
  58. <Storyboard>
  59. <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="ItemsCanvas"/>
  60. <DoubleAnimation Duration="0" To="0.0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ItemsCanvas"/>
  61. </Storyboard>
  62. </VisualState>
  63. <VisualState x:Name="Expanded">
  64. <Storyboard>
  65. <DoubleAnimation Duration="0" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="ItemsCanvas"/>
  66. <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ItemsCanvas"/>
  67. </Storyboard>
  68. </VisualState>
  69. </VisualStateGroup>
  70. <VisualStateGroup x:Name="ExpandabilityStates">
  71. <VisualState x:Name="Expandable"/>
  72. <VisualState x:Name="NonExpandable">
  73. <Storyboard>
  74. <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ExpandableContent">
  75. <DiscreteObjectKeyFrame KeyTime="0:0:0.0" Value="Collapsed"/>
  76. </ObjectAnimationUsingKeyFrames>
  77. <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Line">
  78. <DiscreteObjectKeyFrame KeyTime="0:0:0.0" Value="Collapsed"/>
  79. </ObjectAnimationUsingKeyFrames>
  80. <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="NonExpandableContent">
  81. <DiscreteObjectKeyFrame KeyTime="0:0:0.0" Value="Visible"/>
  82. </ObjectAnimationUsingKeyFrames>
  83. </Storyboard>
  84. </VisualState>
  85. </VisualStateGroup>
  86. </VisualStateManager.VisualStateGroups>
  87. <ListBoxItem x:Name="ExpandableContent" Grid.ColumnSpan="2" Grid.Column="0" toolkit:TiltEffect.IsTiltEnabled="True" Grid.Row="0" Grid.RowSpan="2">
  88. <Grid>
  89. <Grid.ColumnDefinitions>
  90. <ColumnDefinition Width="41"/>
  91. <ColumnDefinition Width="*"/>
  92. </Grid.ColumnDefinitions>
  93. <Grid.RowDefinitions>
  94. <RowDefinition Height="Auto"/>
  95. <RowDefinition Height="Auto"/>
  96. <RowDefinition Height="Auto"/>
  97. </Grid.RowDefinitions>
  98. <ContentControl x:Name="Header" Grid.ColumnSpan="2" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Grid.Column="0" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Grid.Row="0"/>
  99. <ContentControl x:Name="Expander" ContentTemplate="{TemplateBinding ExpanderTemplate}" Content="{TemplateBinding Expander}" Grid.Column="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Margin="11,0" Grid.Row="1"/>
  100. <Grid x:Name="ExpanderPanel" Background="Transparent" Grid.ColumnSpan="2" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2"/>
  101. </Grid>
  102. </ListBoxItem>
  103. <Line x:Name="Line" Grid.Column="1" HorizontalAlignment="Left" Grid.Row="1" Grid.RowSpan="2" Stretch="Fill" Stroke="White" StrokeThickness="3" X1="0" X2="0" Y1="0" Y2="1"/>
  104. <ContentControl x:Name="NonExpandableContent" Grid.ColumnSpan="2" ContentTemplate="{TemplateBinding NonExpandableHeaderTemplate}" Content="{TemplateBinding NonExpandableHeader}" Grid.Column="0" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Grid.Row="0" Grid.RowSpan="2" Visibility="Collapsed"/>
  105. <Canvas x:Name="ItemsCanvas" Grid.Column="1" Margin="11,0" Opacity="0.0" Grid.Row="2">
  106. <Canvas.RenderTransform>
  107. <CompositeTransform TranslateY="0.0"/>
  108. </Canvas.RenderTransform>
  109. <ItemsPresenter x:Name="Presenter"/>
  110. </Canvas>
  111. </Grid>
  112. </ControlTemplate>
  113. </Setter.Value>
  114. </Setter>
  115. </Style>

猜你在找的Windows相关文章