ComponentFactory.Krypton.Toolkit.RenderStandard.GetRadioButtonPreferredSize C# (CSharp) Method

GetRadioButtonPreferredSize() public method

Calculate the requested display size for the radio button.
public GetRadioButtonPreferredSize ( ViewLayoutContext context, IPalette palette, bool enabled, bool checkState, bool tracking, bool pressed ) : Size
context ViewLayoutContext Render context.
palette IPalette Palette for sourcing display values.
enabled bool Should check box be displayed as enabled.
checkState bool Checked state of the radio button.
tracking bool Should check box be displayed as hot tracking.
pressed bool Should check box be displayed as pressed.
return Size
        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;
        }
RenderStandard