我需要將圖像設置爲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>
但如果我有高度和寬度的窗口,原單的圖像,在窗口中的圖像是不是不削理所應當的。我想這是因爲窗戶本身佔據了高度和寬度的一部分。我的屬性我應該使用與原單寬度/高度