[英]Windows Phone 8 edit header pivot page
我正在創建WP應用程序,並希望創建下一個設計樞紐頁面: 圖片
我找到了xaml樣式代碼,但這不是我所需要的。
<Style x:Key="MainPivotStyle" TargetType="phone:Pivot">
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<Grid />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="phone:Pivot">
<Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.RowSpan="2"
Background="DodgerBlue"
CacheMode="BitmapCache" />
<ContentPresenter Grid.Row="0"
Margin="24,17,0,-7"
Content="{TemplateBinding Title}"
ContentTemplate="{TemplateBinding TitleTemplate}" />
<primitives:PivotHeadersControl x:Name="HeadersListElement" Grid.Row="1" />
<Grid Grid.Row="2"
Background="{TemplateBinding Background}"
CacheMode="BitmapCache" />
<ItemsPresenter x:Name="PivotItemPresenter"
Grid.Row="2"
Margin="{TemplateBinding Padding}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
告訴我該怎么做?
ChubosaurusSoftware我想更改活動項目數據透視頁的樣式。
如果是這樣,我已經回答了。 您只有所需的部分Templates
。
請參見如何設置數據透視表頭的樣式 。 這是更改“選定的數據透視表頭”的背景/前景的完整解決方案。 注意到Storyboards
如果要修改標題模板,則需要原始控件名稱空間
<phone:PhoneApplicationPage
xmlns:Primitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone" x:Name="phoneApplicationPage">
有用的SO鏈接
如果您需要更多幫助,那么您打算將Pivot Header設置為哪種樣式? 該圖像具有SelectedItem的底部邊框?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.