I have a todolist app which features several `ListBox` controls inside separate `PivotItems` within a `Pivot` control. If I navigate to another page, and return with the back button, the displayed `Pivot` is unresponsive. However, activity on it (Scrolling, Tapping etc) appears to affect the *next* `Pivot` over, ie the selectedIndex + 1; 

It sounds very much like a bug in the `Pivot` control, but maybe I'm doing something wrong? Here's the code for my pivot control. 

```
[code updated, see below]

```

I don't think the code of the page I'm navigating to is important as the behaviour happens with the back button

**Some other important info:**

* On the very *first* `PivotItem` (index 0), the error **does not** occur.
* On the very *last* `PivotItem`, **a different issue occurs**. Navigating away from the *last* list and returning via the back button shows **an empty list**.
* In all cases, the issue is resolved by swiping to the list to the left or right, and then returning.

**EDIT:** 

I was wrong about the page code not being important. I'm binding in the `OnNavigatedTo` Method rather than the `MainPage` method. Romasz provided a sample which worked perfectly. I broke it by changing three parts to match my own non-working code

1. Set the page to inherit from `INotifyPropertyChanged` (as I use `NotifyPropertyChanged`)
2. Moved the data-binding code to the `OnNavigatedTo` method
3. Set the `ItemsSource` of the `PivotControl` in the code-behind

With these three changes made, the sample does not work. Here's the code. 

MainPage.xaml

```
<Grid x:Name="LayoutRoot" Background="Transparent">
    <Grid x:Name="ContentPanel" Margin="12,0,12,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="9*"/>
        </Grid.RowDefinitions>
        <Button x:Name="myButton" VerticalAlignment="Top" 
             Content="Go to different Page!" Grid.Row="0"/>
        <controls:Pivot x:Name="PivotControl" Grid.Row="1" 
             ItemsSource="{Binding Lists}">
            <controls:Pivot.HeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}"/>
                </DataTemplate>
            </controls:Pivot.HeaderTemplate>
            <controls:Pivot.ItemTemplate>
                <DataTemplate>
                    <ListBox ItemsSource="{Binding Items}" 
            HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" 
            Margin="24,0,0,0" Height="Auto" VerticalAlignment="Stretch">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <CheckBox></CheckBox>
                                    <TextBlock Text="{Binding Title}"/>
                                </StackPanel>                                    
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </DataTemplate>
            </controls:Pivot.ItemTemplate>
        </controls:Pivot>
    </Grid>
</Grid>

```

MainPage.xaml.cs

```
public partial class MainPage : PhoneApplicationPage, INotifyPropertyChanged
{
    public class myItems
    {
        public string Title { get; set; }
    }

    public class myList
    {
        public string Name { get; set; }
        private List<myItems> items = new List<myItems>();
        public List<myItems> Items
        {
            get { return items; }
            set { items = value; }
        }
    }

    private ObservableCollection<myList> _Lists;
    public ObservableCollection<myList> Lists
    {
        get
        {
            return _Lists;
        }
        set
        {
            if (_Lists != value)
            {
                _Lists = value;
                NotifyPropertyChanged("Lists");
            }
        }
    }

    public event PropertyChangedEventHandler PropertyChanged;

    private void NotifyPropertyChanged(string propertyName)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }

    // Constructor
    public MainPage()
    {
        InitializeComponent();
    }

    protected override void OnNavigatedTo(NavigationEventArgs e)
    {
        base.OnNavigatedTo(e);

        Lists = new ObservableCollection<myList>();

        myList list1 = new myList() { Name = "First" };
        for (int i = 0; i < 100; i++)
            list1.Items.Add(new myItems() { Title = (i + 1).ToString() });

        myList list2 = new myList() { Name = "Second" };
        for (int i = 100; i < 200; i++)
            list2.Items.Add(new myItems() { Title = (i + 1).ToString() });

        myList list3 = new myList() { Name = "Third" };
        for (int i = 200; i < 300; i++)
            list3.Items.Add(new myItems() { Title = (i + 1).ToString() });

        myList list4 = new myList() { Name = "Fourth" };
        for (int i = 300; i < 400; i++)
            list4.Items.Add(new myItems() { Title = (i + 1).ToString() });

        Lists.Add(list1);
        Lists.Add(list2);
        Lists.Add(list3);
        Lists.Add(list4);

        myButton.Click += first_Click;
        this.DataContext = this;

    }

    private void first_Click(object sender, RoutedEventArgs e)
    {
        NavigationService.Navigate(new Uri("/Page1.xaml", UriKind.RelativeOrAbsolute));
    }
}

```

Full Project: <https://dl.dropboxusercontent.com/u/568631/PivotProblem_2.zip> 

This code has a very similar issue to what I experienced. If you move to the second or third list, click on the "Go to another page" button, and then hit the back button, the pivot moves to the "first" list and shows it as empty. Navigating away and back resets the list. 

If I change any one of the three differences - remove the inheritence of `INotifyPropertyChanged`, move the binding code to the MainPage or set the `ItemsSource` in the codebehind - the app works again, as expected. This has now become an academic issue (for lack of a better term) as it no longer affects my app, but I still don't know why these three factors combine to cause weird `PivotControl` behaviour 

To re-iterate, changing any ONE of the factors above eliminates the issue - so what causes it?