相关疑难解决方法(0)

我的图像很模糊!为什么WPF的SnapsToDevicePixels不工作?

我在WPF applcation中使用了一些图像.

XAML:

<Image Name="ImageOrderedList"
       Source="images/OrderedList.png"
       ToolTip="Ordered List"
       Margin="0,0,5,5"
       Width="20"
       Height="20"
       SnapsToDevicePixels="True"
       MouseUp="Image_MouseUp"
       MouseEnter="Image_MouseEnter"
       MouseLeave="Image_MouseLeave" />
Run Code Online (Sandbox Code Playgroud)

但是,它们显得模糊:

死链接 - 模糊的WPF图像

这是一个放大的,并排的比较.原件在左侧:

死链接 - 模糊的WPF图像缩放

为什么这SnapsToDevicePixels="True"条线不能阻止这个问题呢?

.net wpf xaml image

164
推荐指数
7
解决办法
5万
查看次数

标签 统计

.net ×1

image ×1

wpf ×1

xaml ×1