public CustomCheckBoxAdapter(CustomCheckBoxRenderer renderer) { Verify.Argument.IsNotNull(renderer, "renderer"); _checkBox = new CustomCheckBox() { Renderer = renderer, }; _checkBox.IsCheckedChanged += OnCheckBoxIsCheckedChanged; _checkBox.CheckStateChanged += OnCheckBoxCheckStateChanged; }
public CustomCheckBoxAdapter(CustomCheckBoxRenderer renderer) { Verify.Argument.IsNotNull(renderer, "renderer"); _checkBox = new CustomCheckBox() { Renderer = renderer, }; _checkBox.IsCheckedChanged += OnCheckBoxIsCheckedChanged; _checkBox.CheckStateChanged += OnCheckBoxCheckStateChanged; }
public CustomCheckBox() { SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.Opaque | ControlStyles.Selectable | ControlStyles.ResizeRedraw | ControlStyles.UserPaint, true); SetStyle( ControlStyles.ContainerControl | ControlStyles.SupportsTransparentBackColor, false); _renderer = CustomCheckBoxRenderer.Default; Size = new Size(86, 18); TabStop = true; }