private void ColorSlideButton_Resize(object sender, EventArgs e) { if (!widthSet) { originalWidth = Width; slideManager = new SlideManager(this, ColorPair.SlideColor); widthSet = true; } }
public ColorSlideButton() { InitializeComponent(); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); custom = false; originalWidth = Width; SetColor += new ThemeChanged(SetDefaultTheme); SetDefaultTheme(CurrentTheme); slideManager = new SlideManager(this, ColorPair.SlideColor); }