예제 #1
0
        /// <summary>
        /// Populates the page with content passed during navigation.  Any saved state is also
        /// provided when recreating a page from a prior session.
        /// </summary>
        /// <param name="sender">
        /// The source of the event; typically <see cref="NavigationHelper"/>
        /// </param>
        /// <param name="e">Event data that provides both the navigation parameter passed to
        /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
        /// a dictionary of state preserved by this page during an earlier
        /// session.  The state will be null the first time a page is visited.</param>
        private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            var group = await SampleDataSource.GetGroupAsync((string)e.NavigationParameter);
            
            
            obj = group.Events;
            this.DefaultViewModel["Events"] = obj;
            string cat = group.category_name;
            MyPivot.Title = cat;
            MyPivot.ItemsSource = obj;
            ////var obj = group.Events;
            //string cat = group.category_name;
            //MyPivot.Title = cat;

            //string temp = "TemplateGrid";
            //int count = 0;
            //foreach (Event ob in obj)
            //{
            //    //object templateHub;
                


            //    //PivotItem pivot = new PivotItem();
            //    //pivot.Header = ob.name;
            //    //pivot.Tag = count.ToString();

            //    //pivot.ContentTemplate = this.Resources[temp + count.ToString()] as DataTemplate;

            //    //MyPivot.Items.Add(pivot);
                
            //    count++;

            //}
        }
예제 #2
0
 /// <summary>
 /// Populates the page with content passed during navigation.  Any saved state is also
 /// provided when recreating a page from a prior session.
 /// </summary>
 /// <param name="sender">
 /// The source of the event; typically <see cref="NavigationHelper"/>
 /// </param>
 /// <param name="e">Event data that provides both the navigation parameter passed to
 /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
 /// a dictionary of state preserved by this page during an earlier
 /// session.  The state will be null the first time a page is visited.</param>
 private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
    
     var group = await SampleDataSource2.GetGroupsAsync();
     //ShowMessage(group.ElementAt(0).url);
     this.DefaultViewModel["Sponsors"] = group;
     bb.ItemsSource = group;
 }
예제 #3
0
 /// <summary>
 /// Populates the page with content passed during navigation.  Any saved state is also
 /// provided when recreating a page from a prior session.
 /// </summary>
 /// <param name="sender">
 /// The source of the event; typically <see cref="NavigationHelper"/>
 /// </param>
 /// <param name="e">Event data that provides both the navigation parameter passed to
 /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
 /// a dictionary of state preserved by this page during an earlier
 /// session.  The state will be null the first time a page is visited.</param>
 private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
 }
예제 #4
0
 /// <summary>
 /// Populates the page with content passed during navigation.  Any saved state is also
 /// provided when recreating a page from a prior session.
 /// </summary>
 /// <param name="sender">
 /// The source of the event; typically <see cref="NavigationHelper"/>
 /// </param>
 /// <param name="e">Event data that provides both the navigation parameter passed to
 /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
 /// a dictionary of state preserved by this page during an earlier
 /// session.  The state will be null the first time a page is visited.</param>
 private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     GlobalVars.flag2 = 0;
     GetJson();
 }