KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In the second code there is a textBlock with the text "Mina övningar" How can I change the text color to black when the tabItem is selected? style: <Style TargetType="{x:Type TabItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TabItem}"> <Grid> <Border Name="Border" Background="Transparent" BorderBrush="Transparent" BorderThickness="0" Margin="0,0,0,13" CornerRadius="5" > <ContentPresenter x:Name="ContentSite" VerticalAlignment="Top" HorizontalAlignment="Center" ContentSource="Header" Margin="9"/> </Border> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="Foreground" Value="Black"/> <Setter TargetName="Border" Property="Background"> <Setter.Value> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FFF9F7FD" Offset="0.432" /> <GradientStop Color="#FFECF7FD" Offset="0.433" /> </LinearGradientBrush> </Setter.Value> </Setter> <Setter TargetName="ContentSite" Property="Margin" Value="9,12,9,9" /> </Trigger> <Trigger Property="IsSelected" Value="False"> <Setter TargetName="Border" Property="Background" Value="Transparent" /> </Trigger>
Tags (comma-separated)
Save Edits
Cancel