Пример #1
0
        /// <summary>
        /// Raises the ColorScheme changed event
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">A EventArgs that contains the event data.</param>
        protected virtual void OnColorSchemeChanged(object sender, ColorSchemeChangeEventArgs e)
        {
            ColorScheme eColorScheme = e.ColorSchema;

            foreach (XPanderPanel xpanderPanel in this.XPanderPanels)
            {
                PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(xpanderPanel)["ColorScheme"];
                if (propertyDescriptor != null)
                {
                    propertyDescriptor.SetValue(xpanderPanel, eColorScheme);
                }
            }
            if (this.ColorSchemeChanged != null)
            {
                this.ColorSchemeChanged(sender, e);
            }
        }
Пример #2
0
 /// <summary>
 /// Raises the ColorScheme changed event
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A EventArgs that contains the event data.</param>
 protected virtual void OnColorSchemeChanged(object sender, ColorSchemeChangeEventArgs e)
 {
     this.PanelColors.Clear();
     this.Invalidate(false);
     if (this.ColorSchemeChanged != null)
     {
         this.ColorSchemeChanged(sender, e);
     }
 }
Пример #3
0
 /// <summary>
 /// Raises the ColorScheme changed event
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A EventArgs that contains the event data.</param>
 protected virtual void OnColorSchemeChanged(object sender, ColorSchemeChangeEventArgs e)
 {
     ColorScheme eColorScheme = e.ColorSchema;
     foreach (XPanderPanel xpanderPanel in this.XPanderPanels)
     {
         PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(xpanderPanel)["ColorScheme"];
         if (propertyDescriptor != null)
         {
             propertyDescriptor.SetValue(xpanderPanel, eColorScheme);
         }
     }
     if (this.ColorSchemeChanged != null)
     {
         this.ColorSchemeChanged(sender, e);
     }
 }