每次更改标签页时都会调用 C# WinForm DrawItem

C# WinForm DrawItem being called each time I change tab page

我有一个选项卡控件,并在我使用的选项卡标题中放置了一个关闭按钮:

private void systemRecordTabControl_DrawItem_1(object sender, DrawItemEventArgs e)
    {           
        e.Graphics.DrawImage(Properties.Resources.icon, e.Bounds.Right - 15, e.Bounds.Top + 3, 11, 11);
        e.Graphics.DrawString(systemRecordTabControl.TabPages[e.Index].Text, new Font("Arial", 12, FontStyle.Underline), Brushes.Black, e.Bounds.Left + 12, e.Bounds.Top + 4);
        e.DrawFocusRectangle();
    }

当程序是 运行 时,每次我在选项卡之间切换时,标题文本都会再次绘制在当前选项卡文本的顶部,这导致它非常难看

示例:

对比

有什么办法可以阻止这种情况的发生吗?我不知道如何检查它是否已经绘制

编辑:作为旁注,这仅在我将标签页外观设置为 "Buttons" 而 DrawMode 属性 为 "OwnerDrawFixed" 时发生,同时将焦点更改为另一个控件使当前选中的标签页return正常(无文字重叠)

重新绘制背景:

    private void systemRecordTabControl_DrawItem_1(object sender, DrawItemEventArgs e)
    {
        e.DrawBackground(); //<-- Redraw background       
        e.Graphics.DrawImage(Properties.Resources.icon, e.Bounds.Right - 15, e.Bounds.Top + 3, 11, 11);
        e.Graphics.DrawString(systemRecordTabControl.TabPages[e.Index].Text, new Font("Arial", 12, FontStyle.Underline), Brushes.Black, e.Bounds.Left + 12, e.Bounds.Top + 4);
        e.DrawFocusRectangle();
    }