[英]WPF Transparent background
Please note that I´m slowly shifting from WinForms to WPF so this might be trivial :/ 请注意,我正在慢慢地从WinForms转移到WPF,所以这可能很简单:/
I´m trying to have 2 radio buttons partly overlapping, the problem is that even tho I have Background="Transparent" I still can see the background hiding part of my second radio button. 我试图将2个单选按钮部分重叠,但问题是,即使我具有Background =“ Transparent”,我仍然可以看到第二个单选按钮的背景隐藏部分。
And here is my wpf code 这是我的WPF代码
Thank you for your time :) 感谢您的时间 :)
Pajamac out. 睡衣出来。
You need to set the styles on the RadioButton
to transparent. 您需要将
RadioButton
上的样式设置为透明。 Place this code in your App.xaml
of your WPF
app, it will change any RadioButton
to transparent. 将此代码放在
WPF
应用程序的App.xaml
中,它将任何RadioButton
更改为透明。
<Style TargetType="{x:Type RadioButton}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
</Style>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.