/// <summary> /// Initializes a new instance of the <see cref="ZeroitToxicButton" /> class. /// </summary> public ZeroitToxicButton() { TabStop = true; Padding = new Padding(3, 3, 3, 3); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.Selectable, true); SetStyle(ControlStyles.SupportsTransparentBackColor, true); BackColor = Color.Transparent; items = new GenericCollection <BarItem>(); items.Inserted += OnItemsInserted; items.Removed += OnItemsRemoved; items.Changed += OnItemsChanged; items.Inserting += OnItemsInserting; items.Changing += OnItemsChanging; items.Removing += OnItemsRemoving; items.Clearing += OnItemsClearing; toolTip = new ToolTip(); appearance = new Appearance(); appearance.AppearanceChanged += OnAppearanceChanged; currentAppearance = new Appearance(); themeProperty = new ThemeProperty(); themeProperty.ThemeChanged += OnAppearanceChanged; showScroll = false; useMnemonic = true; showBorders = true; Height = 200; InitializeDefaultScheme(); SetThemeDefaults(); }
/// <summary> /// Indicates wether <see cref="ThemeProperty" /> needs to be serialized by designer or not. /// </summary> /// <returns>true if designer needs to serialize</returns> protected bool ShouldSerializeThemeProperty() { return(ThemeProperty.DefaultChanged()); }
/// <summary> /// Resets Theme Property to Default Value. /// </summary> protected void ResetThemeProperty() { ThemeProperty.Reset(); }