/// <summary> /// Initialize a new instance of the ViewDrawRibbonQATExtraButton class. /// </summary> /// <param name="ribbon">Reference to owning ribbon control.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public ViewDrawRibbonQATExtraButton(KryptonRibbon ribbon, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); // Remember incoming references _ribbon = ribbon; // Create delegate used to process end of click action _finishDelegate = new EventHandler(ClickFinished); // Attach a controller to this element for the pressing of the button QATExtraButtonController controller = new QATExtraButtonController(ribbon, this, needPaint); controller.Click += new MouseEventHandler(OnClick); MouseController = controller; SourceController = controller; KeyController = controller; }