public ViewDrawRibbonGroup(KryptonRibbon ribbon,
KryptonRibbonGroup ribbonGroup,
NeedPaintHandler needPaint)
{
Debug.Assert(ribbon != null);
Debug.Assert(ribbonGroup != null);
Debug.Assert(needPaint != null);
// Cache source of state specific settings
_ribbon = ribbon;
_ribbonGroup = ribbonGroup;
_needPaint = needPaint;
// Associate this view with the source component (required for design time selection)
Component = _ribbonGroup;
CreateNormalView();
CreateCollapsedView();
// We are always created in the normal state
Add(_layoutNormalMain);
// Set back reference to the actual group definition
_ribbonGroup.GroupView = this;
// Hook into changes in the ribbon button definition
_ribbonGroup.PropertyChanged += new PropertyChangedEventHandler(OnGroupPropertyChanged);
}