Devexpress Checkbutton 蓝线边框 - 如何去除

Devexpress Checkbutton Blueline border - how to remove

我目前正在开发一个 devexpress 项目,我正在使用 checkbutton 工具。除了出现在 appearance.hoverappearance.pressed.

上的非常烦人的病态蓝线外,我让它做我想做的一切

如果有的话,我希望颜色与主题相匹配,但无论选择什么皮肤,恒定的蓝线都很烦人,感觉就像一个旧的 html 设计。

我已经尝试设置 bordercolor 但仍然如此。

下面是我从 form.Designer.cs;

开始尝试的代码
this.cBtnFilter.AllowFocus = false;
this.cBtnFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.cBtnFilter.AppearanceDisabled.Options.UseBackColor = true;
this.cBtnFilter.AppearanceHovered.BorderColor = System.Drawing.Color.White;
this.cBtnFilter.AppearanceHovered.Options.UseBackColor = true;
this.cBtnFilter.AppearanceHovered.Options.UseBorderColor = true;
this.cBtnFilter.AppearancePressed.BorderColor = System.Drawing.Color.White;
this.cBtnFilter.AppearancePressed.Options.UseBackColor = true;
this.cBtnFilter.AppearancePressed.Options.UseBorderColor = true;
this.cBtnFilter.ImageOptions.AllowGlyphSkinning = DevExpress.Utils.DefaultBoolean.False;
this.cBtnFilter.ImageOptions.Location = DevExpress.XtraEditors.ImageLocation.MiddleCenter;
this.cBtnFilter.ImageOptions.SvgImage = global::form.Properties.Resources.icon_filter;
this.cBtnFilter.ImageOptions.SvgImageSize = new System.Drawing.Size(40, 40);
this.cBtnFilter.Location = new System.Drawing.Point(355, 40);
this.cBtnFilter.LookAndFeel.SkinName = "The Bezier";
this.cBtnFilter.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.UltraFlat;
this.cBtnFilter.LookAndFeel.UseDefaultLookAndFeel = false;
this.cBtnFilter.Name = "cBtnFilter";
this.cBtnFilter.PaintStyle = DevExpress.XtraEditors.Controls.PaintStyles.Light;
this.cBtnFilter.ShowFocusRectangle = DevExpress.Utils.DefaultBoolean.False;
this.cBtnFilter.Size = new System.Drawing.Size(50, 50);
toolTipTitleItem4.Text = "Show active Only";
superToolTip4.Items.Add(toolTipTitleItem4);
this.cBtnFilter.SuperTip = superToolTip4;
this.cBtnFilter.TabIndex = 39;
this.cBtnFilter.Click += new System.EventHandler(this.Filter_Click);

所附图片分别是选中时和悬停时的示例。

至少如果我能完全删除蓝线或将其更改为主题颜色。那就太好了。

我正在使用 Devexpress 版本 20.2.4

我是如何解决这个问题的,方法是改用简单按钮并使其像切换按钮一样工作。

此方法为我处理切换

public Boolean buttonState = false;

private void ToggleButton()
        {
            if (buttonState)
            {
                simpleButton.Appearance.BackColor = Color.Red;
                buttonState = false;
            }
            else
            {
                simpleButton.Appearance.BackColor = Color.White;
                buttonState = true;
            }
        }

这是按钮

private void simpleButton_Click(object sender, EventArgs e)
{
    ToggleButton();
}

这是 Designer.cs

中的按钮
this.simpleButton1.AllowFocus = false;
this.simpleButton1.AppearanceHovered.BackColor = System.Drawing.Color.Teal;
this.simpleButton1.AppearanceHovered.Options.UseBackColor = true;
this.simpleButton1.Location = new System.Drawing.Point(524, 214);
this.simpleButton1.LookAndFeel.SkinName = "The Bezier";
this.simpleButton1.LookAndFeel.UseDefaultLookAndFeel = false;
this.simpleButton1.Name = "simpleButton1";
this.simpleButton1.ShowFocusRectangle = DevExpress.Utils.DefaultBoolean.False;
this.simpleButton1.Size = new System.Drawing.Size(157, 150);
this.simpleButton1.TabIndex = 2;
this.simpleButton1.Text = "simpleButton";
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);

它非常简单。如果有人有更好的方法或需要这个,请把你自己打倒。

希望以后Devexpress不要把蓝框强加给我们