我有一个以图像作为背景的窗口。在这个窗口上,我还有按钮和其他控件。
这是我的窗口样式:
<Style x:Key="MyWindow" TargetType="{x:Type Window}">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="Images\myImage.png" />
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<BlurEffect Radius="20" />
</Setter.Value>
</Setter>
</Style>
问题在于模糊效果应用于整个窗口,而不仅仅是背景图像。因此,我的按钮也被模糊了,这不是我想要的。我只想让背景图像模糊,而不是按钮。该怎么做?
10,10,1004,1260
,还可以通过裁剪外部10个像素左右来使其看起来更好。 - Clemens