Hi I have a Category class where I am downloading data from API and displaying in Pivot, now for index 0 of Pivot the data loads, I have added a Pivot selection changed event when user flips to other PivotItems and data get loaded. But the issue is the ItemsSource is not updating. If I do like this pivot.itemssource=""; and pivot.itemssource=mylist; I have to change the pivot.selectedIndex to current index also, in this case the flip is not smooth, it first goes to 0 index because of pivot.itemssource=""; and then come to actual place. Please help me getting a solution for this so that it binds and update automatically. My classes are below:    
Category.xaml
<Grid x:Name="LayoutRoot" >
        <controls:Pivot Margin="0,53,0,28" x:Name="CategoryList" Foreground="White" SelectionChanged="Pivot_SelectionChanged" ItemsSource="{Binding Constants.categoryDetails}" >
            <controls:Pivot.HeaderTemplate>
                <DataTemplate>
                    <TextBlock x:Name="PivotTitle" Text="{Binding name}"></TextBlock>
                </DataTemplate>
            </controls:Pivot.HeaderTemplate>
            <!--Panorama item one-->
            <controls:Pivot.ItemTemplate>
                <DataTemplate>
                    <Grid>
                       <ListBox x:Name="subCatList" ItemsSource="{Binding subcategories}" ScrollViewer.VerticalScrollBarVisibility="Visible">
                            <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <Border BorderThickness="2" BorderBrush="White">
                                            <Grid Width="420" Height="70" Background="#85000000">
                                                <TextBlock Text="{Binding name}"  FontFamily="Verdana" FontSize="35" Margin="10,10,64,5" TextWrapping="Wrap" ></TextBlock>
                                            </Grid>
                                        </Border>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                       </ListBox>
                     </Grid>
                </DataTemplate>
            </controls:Pivot.ItemTemplate>
        </controls:Pivot>
    </Grid>
    <!--Panorama-based applications should not show an ApplicationBar-->
</phone:PhoneApplicationPage>
Category.cs
namespace MyApp.Views
{
    public partial class Category : PhoneApplicationPage
    {
                     List<WebClient> webclientsList = new List<WebClient>();
                     private int selectedIndex=0;
                    private ListBox subCatList;
                    public readonly DependencyProperty ListVerticalOffsetProperty;
                    public Category()
        {
            InitializeComponent();
            for (int i = 0; i < Constants.catList.Length; i++)
            {
                       WebClient wb = new WebClient();
                       CategoriesClass ct = new CategoriesClass();
                       ct.name = Constants.catList[i];
                       webclientsList.Add(wb);
                       Constants.categoryDetails.Add(ct);
            }
                  loadCategory();
        }
        private void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            selectedIndex = CategoryList.SelectedIndex;
            if (Constants.categoryDetails[selectedIndex].subcategories==null) {
                loadCategory();
            }
            else{
            }
        }
        private void loadCategory()
        {
            try
            {
                String Url = Constants.BASE_URL + "/get-category-data/?client_key=" + Constants.CLIENT_KEY;
                webclientsList[selectedIndex].DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClientCategoryDownload);
                webclientsList[selectedIndex].DownloadStringAsync(new Uri(Url));
            }
            catch (Exception e)
            {
                Console.WriteLine("Error Occured"+e.StackTrace);
            }
        }
        void webClientCategoryDownload(object sender, DownloadStringCompletedEventArgs e)
        {
            try
            {
                if (e.Error != null)
                {
                    Console.WriteLine("Error geting category");
                    return;
                }
                CategoryClass ctClass = new CategoryClass();
                ctClass = JsonConvert.DeserializeObject<CategoryClass>(e.Result);
                if (ctClass.name!=null)
                {
                    Console.WriteLine("Category Loaded");
                    Constants.categoryDetails[selectedIndex].categoryDetails = ctClass;
                    Constants.categoryDetails[selectedIndex].subcategories = new ObservableCollection<SubCategories>();
                    foreach (var its in ctClass.categories)
                    {
                        foreach(var chi in its.children){
                            Constants.categoryDetails[selectedIndex].subcategories.Add(chi);
                        }
                    }
                    CategoryList.ItemsSource = "";
                    CategoryList.SelectedIndex = selectedIndex;
                    CategoryList.ItemsSource = Constants.categoryDetails;
                    for(int i=0;i<Constants.categoryDetails.Count;i++){
                        foreach (var x2 in Constants.categoryDetails[selectedIndex].subcategories)
                        {
                            Console.WriteLine("SubCategory is :"+x2.name);
                        }
                    }
                }
                else {
                    Console.WriteLine("Categories Doesnt Exists ");
                }
            }
            catch (Exception e1)
            {
                Console.WriteLine("Exception Occured:"+e1.StackTrace);
            }
        }
        private void Facebook_login(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Views/Login.xaml", UriKind.Relative));
        }
     }
}