Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wp7 pivotcontrol set header null

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_SelectionChanged" LoadedPivotItem="PivotControl_LoadedPivotItem">
</controls:Pivot>
like image 880
Pratik Kothari Avatar asked Nov 21 '10 17:11

Pratik Kothari


1 Answers

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>
like image 177
Pratik Kothari Avatar answered Sep 28 '22 04:09

Pratik Kothari