我想在视图标题部分或xtragrid的组面板部分添加一个简单的按钮(参见附图)。问题是我无法找到使按钮的背景透明的方法。我已经在devexpress论坛上尝试了几乎所有东西(禁用默认样式,使其平坦,超平,没有边界e.t.c)但没有任何效果。图像具有透明度(来自devexpress的默认图像)。
我试过的代码:
btn.LookAndFeel.Style = Flat;
btn.LookAndFeel.UseDefaultLookAndFeel = false;
btn.Appearance.BackColor = Transparent;
btn.Appearance.BackColor2 = Color.Transparent;
btn.BorderStyle = BorderStyles.NoBorder;