protected override void Render(Skins.Skin skin) { if (ShouldDrawBackground) { skin.DrawButton(this, true, false, IsDisabled); } }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skins.Skin skin) { base.Render(skin); if (ShouldDrawBackground) { bool drawDepressed = IsDepressed && IsHovered; if (IsToggle) { drawDepressed = drawDepressed || ToggleState; } bool bDrawHovered = IsHovered && ShouldDrawHover; skin.DrawButton(this, drawDepressed, bDrawHovered, IsDisabled); } }