public override void OnPaint(IGUIContext ctx, RectangleF bounds) { if (!Visible || Font == null || String.IsNullOrEmpty(Text)) { return; } using (var clipChild = new ClipBoundClip(ctx, Bounds, true)) { ctx.DrawString(Text, Font, Style.ForeColorBrush, PaddingBounds, FontFormat.DefaultMultiLine); } // Fadeout animation if (bFadeOut) { try { if (Style.AlphaBack >= 5) { Style.AlphaBack -= 5; Style.AlphaFore -= 5; Style.AlphaBorder -= 5; } } catch (Exception ex) { ex.LogError(); } finally { if (Style.AlphaBack < 5) { OnClose(); } ctx.Invalidate(1); } } }