public override Size GetRadioButtonPreferredSize(ViewLayoutContext context,
IPalette palette,
bool enabled,
bool checkState,
bool tracking,
bool pressed)
{
// Grab an image appropriate to the state
Image drawImage = palette.GetRadioButtonImage(enabled, checkState, tracking, pressed);
if (drawImage == null)
{
// Convert incoming parameters to radio button state
RadioButtonState state = DiscoverRadioButtonState(enabled, checkState, tracking, pressed);
// Request the drawing size of the radio button glyph
return RadioButtonRenderer.GetGlyphSize(context.Graphics, state);
}
else
return drawImage.Size;
}