1
WPF正在放大我的圖片,我正在努力弄清楚爲什麼。從this answer,我知道WPF會自動調整其元數據DPI設置與監視器DPI設置不同的圖像的大小。但是,我已確認我的圖像沒有元數據DPI設置。那麼,爲什麼WPF會調整我的圖像大小?當Stretch =「None」時,爲什麼WPF會調整沒有元數據DPI設置的圖像?
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication1"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Image Source="Untitled-1.png" Stretch="None" />
</Grid>
</Window>