Note that there are some explanatory texts on larger screens.

plurals
  1. POchange the backgorund of the pivot item in windows phone 8
    primarykey
    data
    text
    <p>I have a style </p> <pre><code> &lt;Style x:Key="PivotStyle1" TargetType="phone:Pivot"&gt; &lt;Setter Property="Margin" Value="0"/&gt; &lt;Setter Property="Padding" Value="0"/&gt; &lt;Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/&gt; &lt;Setter Property="Background" Value="Transparent"/&gt; &lt;Setter Property="ItemsPanel"&gt; &lt;Setter.Value&gt; &lt;ItemsPanelTemplate&gt; &lt;Grid/&gt; &lt;/ItemsPanelTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="phone:Pivot"&gt; &lt;Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="*"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid Background="{TemplateBinding Background}" CacheMode="BitmapCache" Grid.RowSpan="3"/&gt; &lt;Grid&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="Auto"/&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition Width="Auto"/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Image Height="45" HorizontalAlignment="Left" Margin="12,0,0,0" VerticalAlignment="Bottom" Source="/Assets/Icons/MyTasks.png" /&gt; &lt;ContentControl ContentTemplate="{TemplateBinding TitleTemplate}" Content="{TemplateBinding Title}" Grid.Column="1" HorizontalAlignment="Left" Margin="10,0,0,-7" VerticalAlignment="Center" Style="{StaticResource PivotTitleStyle}"/&gt; &lt;Image Grid.Column="2" Height="55" Margin="0,10,20,0" HorizontalAlignment="Right" VerticalAlignment="Bottom" Source="/Assets/Icons/Settings.png"/&gt; &lt;/Grid&gt; &lt;Primitives:PivotHeadersControl x:Name="HeadersListElement" Grid.Row="1"/&gt; &lt;ItemsPresenter x:Name="PivotItemPresenter" Margin="{TemplateBinding Padding}" Grid.Row="2"/&gt; &lt;/Grid&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre> <p>This is my pivot code:</p> <pre><code> &lt;phone:Pivot Title="MY TASKS" Style="{StaticResource PivotStyle1}" &gt; &lt;!--Pivot item one--&gt; &lt;phone:PivotItem Header="all"&gt; &lt;/phone:PivotItem&gt; &lt;phone:PivotItem Header="assigned"&gt; &lt;/phone:PivotItem&gt; &lt;phone:PivotItem Header="overdue"&gt; &lt;/phone:PivotItem&gt; &lt;/phone:Pivot&gt; </code></pre> <p>I want to change the color of pivot items. pivot item header "all" in red color, pivot item "assigned" in green color. I have tried to change the background, but that changes the full background. please suggest.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload