Example #1
0
        protected virtual void UpdateStartMenuCategory(StartMenuThemeItem item, MediaCenterLibraryCache readCache, MediaCenterLibraryCache writeCache)
        {
            McmlDocument      mcml = MediaCenterUtil.GetMcml(readCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUCATEGORY.MCML", (object)this.DocumentResourceType));
            PropertiesElement themeUiProperties = McmlUtilities.GetThemeUIProperties(mcml, "StartMenuCategoryView");

            McmlUtilities.UpdateFontElement(item.StripTitleFont, themeUiProperties.GetProperty("Font") as FontElement, item.Theme);
            McmlUtilities.UpdateColorElement(item.FocusedStripTitleColor, themeUiProperties.GetProperty("FocusColor"), item.Theme);
            McmlUtilities.UpdateColorElement(item.NonFocusedStripTitleColor, themeUiProperties.GetProperty("NoFocusColor"), item.Theme);
            MediaCenterUtil.UpdateMcml(writeCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUCATEGORY.MCML", (object)this.DocumentResourceType), mcml);
        }
Example #2
0
        protected virtual void UpdateQuickLinks(StartMenuThemeItem item, MediaCenterLibraryCache readCache, MediaCenterLibraryCache writeCache)
        {
            McmlDocument      mcml = MediaCenterUtil.GetMcml(readCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUQUICKLINK.MCML", (object)this.DocumentResourceType));
            PropertiesElement themeUiProperties = McmlUtilities.GetThemeUIProperties(mcml, "BaseQuickLinkContent");

            McmlUtilities.UpdateFontElement(item.NonFocusedQuickLinkFont, themeUiProperties.GetProperty("Font") as FontElement, item.Theme);
            McmlUtilities.UpdateFontElement(item.FocusedQuickLinkFont, themeUiProperties.GetProperty("FocusFont") as FontElement, item.Theme);
            McmlUtilities.UpdateColorElement(item.FocusedQuickLinkColor, themeUiProperties.GetProperty("FocusColor"), item.Theme);
            McmlUtilities.UpdateColorElement(item.NonFocusedQuickLinkColor, themeUiProperties.GetProperty("NoFocusColor"), item.Theme);
            MediaCenterUtil.UpdateMcml(writeCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUQUICKLINK.MCML", (object)this.DocumentResourceType), mcml);
        }
Example #3
0
        protected virtual void UpdateStartMenuOverlay(StartMenuThemeItem item, MediaCenterLibraryCache readCache, MediaCenterLibraryCache writeCache)
        {
            McmlDocument      mcml = MediaCenterUtil.GetMcml(readCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUOVERLAY.MCML", (object)this.DocumentResourceType));
            PropertiesElement themeUiProperties = McmlUtilities.GetThemeUIProperties(mcml, "StartMenuOverlay");

            if (!string.IsNullOrEmpty(item.StartMenuText))
            {
                themeUiProperties.GetProperty("StartText").Value = item.StartMenuText;
            }
            McmlUtilities.UpdateFontElement(item.StartMenuTextFont, themeUiProperties.GetProperty("StartTextFont") as FontElement, item.Theme);
            McmlUtilities.UpdateColorElement(item.StartMenuTextColor, themeUiProperties.GetProperty("StartTextColor"), item.Theme);
            MediaCenterUtil.UpdateMcml(writeCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUOVERLAY.MCML", (object)this.DocumentResourceType), mcml);
        }
Example #4
0
        public static PropertyElement GetThemeProperty(this PropertiesElement propertiesElement, string name)
        {
            PropertyElement property = propertiesElement.GetProperty(name);

            if (property == null)
            {
                throw new ThemeApplicationException(string.Format("Could not find property {0}.", (object)name));
            }
            else
            {
                return(property);
            }
        }