For a PivotControl, I am using code like this to set the Title and Header Property to null, but the pivotcontrol still displays a string in the Header with the name of the object that is being bound for that PivotItem. I want to basically hide everything in the Header of the PivotItem. How should I do this?
<controls:Pivot
x:Name="PivotControl"
TitleTemplate="{x:Null}"
HeaderTemplate="{x:Null}"
ItemsSource="{Binding TestEntries}"
ItemTemplate="{StaticResource TestEntryItemTemplate}"
SelectionChanged="PivotControl_Selectio开发者_开发技巧nChanged" LoadedPivotItem="PivotControl_LoadedPivotItem">
</controls:Pivot>
Did something like this:
<DataTemplate x:Key="TestEntryHeaderTemplate">
<TextBlock Text="" Height="1"></TextBlock>
</DataTemplate>
and for PivotControl
<controls:Pivot
x:Name="PivotControl"
Title="{StaticResource AppName}"
HeaderTemplate="{StaticResource TestEntryHeaderTemplate}"
ItemsSource="{Binding TestEntries}"
ItemTemplate="{StaticResource TestItemTemplate}"
SelectionChanged="PivotControl_SelectionChanged" LoadedPivotItem="PivotControl_LoadedPivotItem">
</controls:Pivot>
精彩评论