我有一个枢轴控件,我想更改未选择的枢轴的样式。特别是,我想改变不透明度。
我知道它与 Primitives:PivotHeadersControl 有关,但我不知道在该控件的样式上设置什么。
我的支点有以下风格
</Grid>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<Grid Background="{StaticResource TabHeaderBackgroundBrush}" >
<Border BorderBrush="White" BorderThickness="1">
<TextBlock Text="{Binding}" FontSize="28" Margin="15,0,15,0"
Foreground="{StaticResource ForegroundBrush}"/>
</Border>
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Controls:Pivot">
<Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Background="Transparent" CacheMode="BitmapCache" Grid.RowSpan="2" />
<Grid Background="{TemplateBinding Background}" CacheMode="BitmapCache"
Grid.Row="2" />
<ContentPresenter ContentTemplate="{TemplateBinding TitleTemplate}"
Content="{TemplateBinding Title}" Margin="24,17,0,-7"/>
<Primitives:PivotHeadersControl x:Name="HeadersListElement"
Grid.Row="1" >
</Primitives:PivotHeadersControl>
<Border Margin="0,-1,0,0" BorderBrush="White"
BorderThickness="1" Grid.Row="2"
Background="{StaticResource TabBackgroundBrush}">
<ItemsPresenter x:Name="PivotItemPresenter"
Margin="0"/>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>