ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGroupClusterButton.ViewDrawRibbonGroupClusterButton C# (CSharp) 메소드

ViewDrawRibbonGroupClusterButton() 공개 메소드

Initialize a new instance of the ViewDrawRibbonGroupClusterButton class.
public ViewDrawRibbonGroupClusterButton ( KryptonRibbon ribbon, KryptonRibbonGroupClusterButton ribbonButton, NeedPaintHandler needPaint ) : System
ribbon KryptonRibbon Reference to owning ribbon control.
ribbonButton KryptonRibbonGroupClusterButton Reference to source button definition.
needPaint NeedPaintHandler Delegate for notifying paint requests.
리턴 System
        public ViewDrawRibbonGroupClusterButton(KryptonRibbon ribbon,
                                                KryptonRibbonGroupClusterButton ribbonButton,
                                                NeedPaintHandler needPaint)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(ribbonButton != null);
            Debug.Assert(needPaint != null);

            // Remember incoming references
            _ribbon = ribbon;
            _ribbonButton = ribbonButton;
            _needPaint = needPaint;
            _currentSize = _ribbonButton.ItemSizeCurrent;

            // Associate this view with the source component (required for design time selection)
            Component = _ribbonButton;

            // Create the small button view
            CreateView();

            // Update view reflect current button state
            UpdateEnabledState();
            UpdateCheckedState();
            UpdateDropDownState();
            UpdateItemSizeState();

            // Hook into changes in the ribbon button definition
            _ribbonButton.PropertyChanged += new PropertyChangedEventHandler(OnButtonPropertyChanged);
        }