ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGroupDialogButton.ViewDrawRibbonGroupDialogButton C# (CSharp) Method

ViewDrawRibbonGroupDialogButton() public method

Initialize a new instance of the ViewDrawRibbonGroupDialogButton class.
public ViewDrawRibbonGroupDialogButton ( KryptonRibbon ribbon, KryptonRibbonGroup ribbonGroup, NeedPaintHandler needPaint ) : System
ribbon KryptonRibbon Reference to owning ribbon control.
ribbonGroup KryptonRibbonGroup Reference to ribbon group this represents.
needPaint NeedPaintHandler Delegate for notifying paint requests.
return System
        public ViewDrawRibbonGroupDialogButton(KryptonRibbon ribbon,
                                               KryptonRibbonGroup ribbonGroup,
                                               NeedPaintHandler needPaint)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(ribbonGroup != null);

            // Remember incoming references
            _ribbon = ribbon;
            _ribbonGroup = ribbonGroup;

            // Attach a controller to this element for the pressing of the button
            DialogLauncherButtonController controller = new DialogLauncherButtonController(ribbon, this, needPaint);
            controller.Click += new MouseEventHandler(OnClick);
            MouseController = controller;
            SourceController = controller;
            KeyController = controller;
        }