Problem with Pivot

Nov 15, 2013 at 6:05 AM
I want to use your Pivot control, but always get an 'Object reference not set to an instance of an object' (XAML).
Implemented it the way described in the Documentation but doesen't work on win8, win8.1.
Tried with Version 2.0.13.0

Can you give me any hints to get it work.
Coordinator
Nov 15, 2013 at 4:00 PM
Can you post some code (XAML & code-behind)?
Nov 18, 2013 at 6:36 AM
I used the code posted in the documentation. (without any code-behind)
Target Platform Windows 8.1
<Page
     x:Class="WinRT_Pivot.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:WinRT_Pivot"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Controls="using:MyToolkit.Controls"
    mc:Ignorable="d">
            <Controls:Pivot>
            <Controls:Pivot.HeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Header}" FontSize="36" 
                    FontWeight="Light" Margin="0,-10,20,20" />
                </DataTemplate>
            </Controls:Pivot.HeaderTemplate>
            <Controls:PivotItem Header="first">                
            </Controls:PivotItem>
            <Controls:PivotItem Header="second">            
            </Controls:PivotItem>
        </Controls:Pivot>
    </Page>
Coordinator
Nov 18, 2013 at 6:46 AM
The problem is that the PivotItem cannot be empty...
See updated documentation: https://mytoolkit.codeplex.com/wikipage?title=Pivot
Nov 18, 2013 at 7:35 AM
Thanks, now it works like a charm...

Is it possible to swipe through the individual Pivot items, instead of tapping the Header to change the selected item??