radbuttontelerik/winform/c#: 如何去掉图标的边框?

radbuttontelerik/winform/c#: how to remove border of the icon?

我有这个搜索器

我想去掉玻璃的边框。

它是 RadButtonTextBoxWinformc#.

我尝试修改文本框的颜色,但没有得到我需要的:

this.radtxtFilter.RightButtonItems[0].EnableBorderHighlight = false;
this.radtxtFilter.RightButtonItems[0].BorderHighlightColor = System.Drawing.Color.Red;

我该怎么做?

消除右按钮元素周围边框的最简单方法是操纵其可见性属性:

        RadButtonElement radButtonElement = new RadButtonElement();
        radButtonElement.Text = "";
        radButtonElement.DisplayStyle = Telerik.WinControls.DisplayStyle.Text;
        radButtonElement.TextElement.CustomFont = "TelerikWebUI";
        radButtonElement.TextElement.CustomFontSize = 10;

        radButtonElement.BorderElement.Visibility = ElementVisibility.Collapsed;

        this.radButtonTextBox1.RightButtonItems.Add(radButtonElement);

属性 ShouldPaint 是答案:

RadButtonElement radButtonElement = new RadButtonElement();
radButtonElement.ImagePrimitive.Image = Resources.TV_search;
radButtonElement.BorderElement.ShouldPaint = false;
this.radtxtFilter.RightButtonItems.Add(radButtonElement);