Ejemplo n.º 1
0
        /// <summary>
        /// Loads first pivot item content at page load
        /// </summary>
        private async void LoadFirstPivotItem()
        {
            ucCityDetailsControl                         = new CityDetailUserControl();
            ucCityDetailsControl.DataContext             = (pvCities.SelectedItem as PivotItem).DataContext;
            (pvCities.SelectedItem as PivotItem).Content = ucCityDetailsControl;
            await ucCityDetailsControl.LoadCategoriesData();

            ucCityDetailsControl.cityItemsList.Tap += cityItemsList_Tap;
            pvCities.LoadedPivotItem   += pvCities_LoadedPivotItem;
            pvCities.UnloadedPivotItem += pvCities_UnloadedPivotItem;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Load user control in to selected pivot.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void pvCities_LoadedPivotItem(object sender, PivotItemEventArgs e)
        {
            try
            {
                ucCityDetailsControl             = new CityDetailUserControl();
                ucCityDetailsControl.DataContext = (pvCities.SelectedItem as PivotItem).DataContext;
                e.Item.Content = ucCityDetailsControl;
                await ucCityDetailsControl.LoadCategoriesData();

                ucCityDetailsControl.cityItemsList.Tap += cityItemsList_Tap;
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Loads first pivot item content at page load
 /// </summary>
 private async void LoadFirstPivotItem()
 {
     ucCityDetailsControl = new CityDetailUserControl();
     ucCityDetailsControl.DataContext = (pvCities.SelectedItem as PivotItem).DataContext;
     (pvCities.SelectedItem as PivotItem).Content = ucCityDetailsControl;
     await ucCityDetailsControl.LoadCategoriesData();
     ucCityDetailsControl.cityItemsList.Tap += cityItemsList_Tap;
     pvCities.LoadedPivotItem += pvCities_LoadedPivotItem;
     pvCities.UnloadedPivotItem += pvCities_UnloadedPivotItem;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Load user control in to selected pivot.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private async void pvCities_LoadedPivotItem(object sender, PivotItemEventArgs e)
 {
     try
     {
         ucCityDetailsControl = new CityDetailUserControl();
         ucCityDetailsControl.DataContext = (pvCities.SelectedItem as PivotItem).DataContext;
         e.Item.Content = ucCityDetailsControl;
         await ucCityDetailsControl.LoadCategoriesData();
         ucCityDetailsControl.cityItemsList.Tap += cityItemsList_Tap;
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message);
     }
 }