public ViewDrawRibbonGroupRadioButton(KryptonRibbon ribbon,
KryptonRibbonGroupRadioButton ribbonRadioButton,
NeedPaintHandler needPaint)
{
Debug.Assert(ribbon != null);
Debug.Assert(ribbonRadioButton != null);
Debug.Assert(needPaint != null);
// Remember incoming references
_ribbon = ribbon;
_ribbonRadioButton = ribbonRadioButton;
_needPaint = needPaint;
_currentSize = _ribbonRadioButton.ItemSizeCurrent;
// Create delegate used to process end of click action
_finishDelegateLarge = new EventHandler(ActionFinishedLarge);
_finishDelegateMediumSmall = new EventHandler(ActionFinishedMediumSmall);
// Associate this view with the source component (required for design time selection)
Component = _ribbonRadioButton;
// Create the different views for different sizes of the radio button
CreateLargeRadioButtonView();
CreateMediumSmallRadioButtonView();
// Update all views to reflect current radio button state
UpdateEnabledState();
UpdateCheckedState();
UpdateItemSizeState();
// Hook into changes in the ribbon radio button definition
_ribbonRadioButton.PropertyChanged += new PropertyChangedEventHandler(OnRadioButtonPropertyChanged);
}