我需要将图像设置为WPF窗口的背景。我已经将它设置这样的:将图像的高度和宽度设置为WPF背景
<Window x:Class="DiagramView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="418" Width="1185" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
<Window.Background>
<ImageBrush ImageSource="../Images/Med.jpg" ></ImageBrush>
</Window.Background>
</Window>
但如果我有高度和宽度的窗口,原单的图像,在窗口中的图像是不是不削理所应当的。我想这是因为窗户本身占据了高度和宽度的一部分。我的属性我应该使用与原单宽度/高度