public void UpdateSelectionState(MenuSectionName selectedSection)
 {
     if (selectedSection == this._attachedSection)
     {
         this.TitleForeground = new SolidColorBrush(Color.FromArgb(byte.MaxValue, (byte)115, (byte)168, (byte)230));
         this.IconForeground  = this.TitleForeground;
     }
     else
     {
         this.TitleForeground = new SolidColorBrush(Colors.White);
         this.IconForeground  = (SolidColorBrush)Application.Current.Resources["PhoneMainMenuIconsBrush"];
     }
 }
示例#2
0
        public void UpdateState()
        {
            MenuSectionName selectedSection = MenuSectionName.Unknown;

            if (this.IsOnNewsPage)
            {
                selectedSection = MenuSectionName.News;
            }
            else if (this.IsOnMessagesPage)
            {
                selectedSection = MenuSectionName.Messages;
            }
            else if (this.IsOnNotificationsPage)
            {
                selectedSection = MenuSectionName.Notifications;
            }
            else if (this.IsOnFriendsPage)
            {
                selectedSection = MenuSectionName.Friends;
            }
            else if (this.IsOnCommunitiesPage)
            {
                selectedSection = MenuSectionName.Communities;
            }
            else if (this.IsOnPhotosPage)
            {
                selectedSection = MenuSectionName.Photos;
            }
            else if (this.IsOnVideosPage)
            {
                selectedSection = MenuSectionName.Videos;
            }
            else if (this.IsOnAudiosPage)
            {
                selectedSection = MenuSectionName.Audios;
            }
            else if (this.IsOnGamesPage)
            {
                selectedSection = MenuSectionName.Games;
            }
            else if (this.IsOnFavoritesPage)
            {
                selectedSection = MenuSectionName.Bookmarks;
            }
            else if (this.IsOnSettingsPage)
            {
                selectedSection = MenuSectionName.Settings;
            }
            ((MenuViewModel)base.DataContext).UpdateSelectedItem(selectedSection);
        }
示例#3
0
 public void UpdateSelectedItem(MenuSectionName selectedSection)
 {
     this.NewsItem.UpdateSelectionState(selectedSection);
     this.NotificationsItem.UpdateSelectionState(selectedSection);
     this.MessagesItem.UpdateSelectionState(selectedSection);
     this.FriendsItem.UpdateSelectionState(selectedSection);
     this.CommunitiesItem.UpdateSelectionState(selectedSection);
     this.PhotosItem.UpdateSelectionState(selectedSection);
     this.VideosItem.UpdateSelectionState(selectedSection);
     this.AudiosItem.UpdateSelectionState(selectedSection);
     this.GamesItem.UpdateSelectionState(selectedSection);
     this.BookmarksItem.UpdateSelectionState(selectedSection);
     this.SettingsItem.UpdateSelectionState(selectedSection);
 }
 public MenuItemViewModel(MenuSectionName attachedSection)
 {
     this._attachedSection = attachedSection;
     this.UpdateCount();
     this.UpdateSelectionState(MenuSectionName.Unknown);
 }