如何关闭抗锯齿在WPF形状? [英] How to turn off the anti-aliasing in WPF shapes?

查看:984
本文介绍了如何关闭抗锯齿在WPF形状?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我画一个长方形使用:

<Rectangle Width="300" Height="100" Stroke="Blue" StrokeThickness="6"> </Rectangle>

,但有施加到其反走样。有没有办法关闭这个功能?我希望它很清晰。

but there is anti-aliasing applied to it. Is there a way to turn this off? I want it to be sharp and clear.

推荐答案

一个有点晚,但 RenderOptions.EdgeMode =别名的伎俩

<Rectangle Width="300"
           Height="100"
           Stroke="Blue"
           StrokeThickness="6"
           RenderOptions.EdgeMode="Aliased"/>

这篇关于如何关闭抗锯齿在WPF形状?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆