コード例 #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)
        {
            // TODO: Create an appropriate data model for your problem domain to replace the sample data
            var item = await SampleDataSource.GetItemAsync((string)e.NavigationParameter);

            this.DefaultViewModel["Item"] = item;
        }
コード例 #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>
 /// var subitemDet
 private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     var subitemDet = await SampleDataSource.GetGroupAsync("Result");
     this.DefaultViewModel["Group"] = subitemDet;
     //    refresh();
     //    this.DefaultViewModel["Item"] = items; 
     //
 }
コード例 #3
0
 private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     var eventpin = await SampleDataSource.GetSubItemAsync((string)e.NavigationParameter);
     if (eventpin != null)
     { 
         eventName = eventpin.Title;
       
         eventTitle = eventpin.Content;
     }
 }
コード例 #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 async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     // TODO: Create an appropriate data model for your problem domain to replace the sample data
     var item = await SampleDataSource.GetSubItemAsync((string)e.NavigationParameter);
     /*  if (item != null)
           test.Text = "Returned something "+ item.UniqueId;
       else
           test.Text = "Returned Nothing";
       */
     this.DefaultViewModel["SubItem"] = item;
 }
コード例 #5
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)
        {
            //item= await  SampleDataSource.GetItemAsync((string)e.NavigationParameter);
            // if(item==null)
            //{
            //subitem= await SampleDataSource.GetSubItemAsync((string)e.NavigationParameter);
            //}
            //await AddEntryIntoJsonAsync();


        }
コード例 #6
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)
        {
            // TODO: Create an appropriate data model for your problem domain to replace the sample data
            //var subId = (string)e.NavigationParameter;
            subitem = await SampleDataSource.GetSubItemAsync((string)e.NavigationParameter);
            this.DefaultViewModel["SubItem"] = subitem;
           
            await IsFavourite(subitem.UniqueId);


            // else
            //   test.Text = "Returned Nothing";


        }
コード例 #7
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("Schedule");
            this.DefaultViewModel["Groups"] = group;
            this.DefaultViewModel["Items"] = group.Items;
            //var item = await SampleDataSource.GetItemAsync();
            //this.DefaultViewModel["SubItems"] = item.SubItems;

           
            /*  if (item != null)
                  test.Text = "Returned something "+ item.UniqueId;
              else
                  test.Text = "Returned Nothing";
              */
           
        }
コード例 #8
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)
        {

            titleList = new List<string>();
            var group = await SampleDataSource.GetGroupAsync("Events");
            foreach (var item in group.Items)
            {
                foreach (var subitem in item.SubItems)
                {
                    titleList.Add(subitem.Title);
                }
            }
            var groupKerEv = await SampleDataSource.GetGroupAsync("KernelEvents");
            foreach (var itemKer in groupKerEv.Items)
            {

                titleList.Add(itemKer.Title);

            }
            //SearchBox.ItemsSource = titleList;
        }
コード例 #9
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)
 {
 }
コード例 #10
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 subitem = await SampleDataSource.GetSubItemAsync((string)e.NavigationParameter);
     this.DefaultViewModel["SubItems"] = subitem;
 }
コード例 #11
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)
 {
     // TODO: Assign a collection of bindable groups to this.DefaultViewModel["Groups"]
     var group = await SampleDataSource.GetGroupAsync("Schedule");
     this.DefaultViewModel["Items"] = group.Items;
 }
コード例 #12
0
 private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     var subitemDet = await SampleDataSource.GetGroupAsync("Schedule");
     this.DefaultViewModel["Group"] = subitemDet;
 }
コード例 #13
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)
  {
      // TODO: Create an appropriate data model for your problem domain to replace the sample data
      try {
          
          var sampleDataGroups = await SampleDataSource.GetGroupsAsync();
          this.DefaultViewModel["Groups"] = sampleDataGroups;
          
      }
      catch { }
  }
コード例 #14
0
 private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     var itemDetails = await SampleDataSource.GetGroupAsync("Participation");
     this.DefaultViewModel["Group"] = itemDetails;
 }
コード例 #15
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);
            this.DefaultViewModel["Group"] = group;
            this.DefaultViewModel["Items"] = group.Items;
            var item = await SampleDataSource.GetSubItemAsync((string)e.NavigationParameter);
            /*  if (item != null)
                  test.Text = "Returned something "+ item.UniqueId;
              else
                  test.Text = "Returned Nothing";
              */
            this.DefaultViewModel["SubItem"] = item;
         
        
            // TODO: Assign a bindable group to Me.DefaultViewModel("Group")
            // TODO: Assign a collection of bindable items to Me.DefaultViewModel("Items")

            if (e.PageState == null)
            {
                // When this is a new page, select the first item automatically unless logical page
                // navigation is being used (see the logical page navigation #region below.)
                if (!this.UsingLogicalPageNavigation() && this.itemsViewSource.View != null)
                {
                    this.itemsViewSource.View.MoveCurrentToFirst();
                }
            }
            else
            {
                // Restore the previously saved state associated with this page
                if (e.PageState.ContainsKey("SelectedItem") && this.itemsViewSource.View != null)
                {
                    // TODO: Invoke Me.itemsViewSource.View.MoveCurrentTo() with the selected
                    //       item as specified by the value of pageState("SelectedItem")
                    var selectedItem = await SampleDataSource.GetItemAsync((String)e.PageState["SelectedItem"]);
                    this.itemsViewSource.View.MoveCurrentTo(selectedItem);

                }
            }
        }
コード例 #16
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)
 {
     SampleDataItem item = await SampleDataSource.GetItemAsync((string)e.NavigationParameter);
     //item1 = await SampleDataSource.GetSubItemAsync2(item.UniqueId);
     this.DefaultViewModel["Item"] = item;
 }