コード例 #1
0
        private void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Pivot pivot = sender as Pivot;

            if (pivot == null)
            {
                return;
            }

            switch (pivot.SelectedIndex)
            {
            case 0:
                HubTileService.UnfreezeGroup("Food");
                HubTileService.FreezeGroup("Places");
                HubTileService.FreezeGroup("Sizes");
                break;

            case 1:
                HubTileService.FreezeGroup("Food");
                HubTileService.UnfreezeGroup("Places");
                HubTileService.FreezeGroup("Sizes");
                break;

            case 2:
                HubTileService.FreezeGroup("Food");
                HubTileService.FreezeGroup("Places");
                HubTileService.UnfreezeGroup("Sizes");
                break;
            }
        }
コード例 #2
0
        private void pano_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (pano.SelectedIndex != 2 || this.ViewModel.IsInProgress)
            {
                HubTileService.FreezeGroup("Latest");
            }
            else
            {
                HubTileService.UnfreezeGroup("Latest");
            }

            this.MainPageViewModel.CurrentSectionIndex = pano.SelectedIndex;
        }
コード例 #3
0
        private void pivotNumbers_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var itm    = e.AddedItems[0] as NumberInfo;
            var olditm = e.RemovedItems[0] as NumberInfo;

            if (e.RemovedItems[0] != null)
            {
                HubTileService.FreezeGroup(olditm.Number);
            }
            if (e.AddedItems[0] != null)
            {
                HubTileService.UnfreezeGroup(itm.Number);
            }
        }
コード例 #4
0
        private void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var pivot = (sender as Pivot);

            if (pivot.SelectedIndex == 0)
            {
                HubTileService.UnfreezeGroup("food");
                HubTileService.FreezeGroup("places");
                HubTileService.FreezeGroup("people");
            }
            else if (pivot.SelectedIndex == 1)
            {
                HubTileService.UnfreezeGroup("places");
                HubTileService.FreezeGroup("food");
                HubTileService.FreezeGroup("people");
            }
            else
            {
                HubTileService.FreezeGroup("food");
                HubTileService.FreezeGroup("places");
                HubTileService.UnfreezeGroup("people");
            }
        }
コード例 #5
0
        /// <summary>
        /// Called when the user navigates between panoramas; changes the appbar to show different possibilities per panorama.
        /// </summary>
        private void OnPanoramaSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (((Panorama)sender).SelectedIndex)
            {
            // What's New PanoramaItem
            case 0:
                HubTileService.FreezeGroup("featured");
                break;

            // Featured PanoramaItem
            case 1:
                ApplicationBar.Mode = ApplicationBarMode.Minimized;
                ApplicationBar.Buttons.Clear();
                HubTileService.UnfreezeGroup("featured");
                break;

            // All Categories/Feeds PanoramaItem
            case 2:
                ApplicationBar.Mode = ApplicationBarMode.Default;
                ApplicationBarIconButton addButton = new ApplicationBarIconButton
                {
                    Text    = AppResources.MainPageAppBarAddText,
                    IconUri = new Uri("/Icons/appbar.add.rest.png", UriKind.Relative)
                };
                addButton.Click += OnAddClick;
                ApplicationBar.Buttons.Add(addButton);
                HubTileService.FreezeGroup("featured");
                break;

            // Settings PanoramaItem
            case 3:
                ApplicationBar.Mode = ApplicationBarMode.Minimized;
                ApplicationBar.Buttons.Clear();
                HubTileService.FreezeGroup("featured");
                break;
            }
        }
コード例 #6
0
 public virtual void OnHidden()
 {
     HubTileService.FreezeGroup(this.GroupTag);
 }
コード例 #7
0
ファイル: MainPage.xaml.cs プロジェクト: 73ch61rl/WC-master
 private void Freeze_Over(object sender, MouseEventArgs e)
 {
     HubTileService.FreezeGroup("Freeze");
 }