コード例 #1
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(SkinBase skin)
 {
     if (ShouldDrawBackground)
         skin.DrawButton(this, true, false, IsDisabled);
 }
コード例 #2
0
ファイル: Button.cs プロジェクト: WardBenjamin/gwen-dotnet
        /// <summary>
        /// Renders the control using specified skin.
        /// </summary>
        /// <param name="skin">Skin to use.</param>
        protected override void Render(SkinBase 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);
            }
        }