Exemplo n.º 1
0
        /// <summary>
        /// Assign a different control theme to a managed theme
        /// </summary>
        /// <param name="themeName"></param>
        /// <param name="theme"></param>
        public void SetTheme(string themeName, ControlTheme theme)
        {
            ManagedTheme mtheme;

            if (ManagedThemes.TryGetValue(themeName, out mtheme))
            {
                mtheme.Theme = theme;
            }
            else
            {
                throw new ArgumentException("Tried to set unregistered theme");
            }
        }
Exemplo n.º 2
0
 public void SetTheme(ControlTheme theme)
 {
     if (theme != this.Theme)
     {
         this.Theme = theme as LabelTheme;
     }
     else
     if (this.Theme != null)
     {
         ApplyThemeColors(this.Theme);
     }
     else
     {
         RestoreDefaultColors();
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Registers a managed theme for management by the theme manager
 /// </summary>
 /// <param name="theme"></param>
 /// <param name="themeName"></param>
 public void RegisterTheme(ControlTheme theme, string themeName)
 {
     ManagedThemes.Add(themeName, new ManagedTheme(theme));
 }
Exemplo n.º 4
0
 public ManagedTheme(ControlTheme theme)
 {
     this.Theme = theme;
 }
 public ThemeEventArgs(ControlTheme theme)
 {
     Theme = theme;
 }