这个和GPU有关,参考地址

https://www.cplotts.com/2009/02/25/gpu-effects-blurry-text/

产生问题的代码如下:

 <Window
x:Class="EffectsAndBlurryText.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Effects and Blurry Text (Bad)"
Height="300"
Width="500"
>
<Grid>
<Border
Margin="20"
Background="White"
BorderBrush="DarkBlue"
BorderThickness="3"
CornerRadius="25"
>
<Border.Effect>
<DropShadowEffect Color="DarkGray"/>
</Border.Effect>
<TextBlock
Text="Why, oh, why is this text blurry?"
FontSize="24"
TextWrapping="Wrap"
Foreground="DarkBlue"
HorizontalAlignment="Center"
VerticalAlignment="Center"
/>
</Border>
</Grid>
</Window>

解决问题的代码如下:

 <Window
x:Class="EffectsAndBlurryText.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Effects and Blurry Text (Fixed)"
Height="300"
Width="500"
>
<Grid>
<Border
Margin="20"
BorderThickness="3"
CornerRadius="25"
Background="White"
BorderBrush="DarkBlue"
>
<Border.Effect>
<DropShadowEffect Color="DarkGray"/>
</Border.Effect>
</Border>
<Border
Margin="20"
BorderThickness="3"
CornerRadius="25"
>
<TextBlock
Text="Ah, now, the text is not blurry."
FontSize="24"
TextWrapping="Wrap"
Foreground="DarkBlue"
HorizontalAlignment="Center"
VerticalAlignment="Center"
/>
</Border>
</Grid>
</Window>

最新文章

  1. PLSQLDeveloper 常用设置
  2. mysql and 和 or 的 优先级和 查询问题
  3. linux基础命令学习五(软件包管理、下载管理)
  4. com学习(四)2——用 ATL 写第一个组件(vs2003)
  5. 【转】用java实例学习MVC模式
  6. 如何保护 .NET 应用的安全?
  7. 经典阅读-《Effective C++》Item1:视C++为一个联邦语言
  8. Gradle学习之基础篇
  9. blfs(systemv版本)学习笔记-编译安装i3-wm平铺式窗口管理器
  10. Python-获取法定节假日
  11. 25个最常用的iptables策略
  12. Python 爬虫-Robots协议
  13. 序列化和反序列化(json 和pickle)dumps 为序列化, json为反序列化
  14. 解压查看二进制rpm包的方法
  15. 如何递归执行view的动画
  16. Python 3.6安装教程
  17. 设计模式--观察者模式C++实现
  18. 安装Hadoop2.7和hive2.0以及redis
  19. HDU 1176 免费馅饼 简单动态规划
  20. iOS 闭包传值 和 代理传值

热门文章

  1. 代替C++的getchar()
  2. 在Kubernetes集群中安装Helm及证书认证
  3. python自定义函数的参数之四种表现形式
  4. js之string操作符
  5. 1032. Sharing (25)
  6. GBDT用于分类问题
  7. 多目标遗传算法 ------ NSGA-II (部分源码解析)目标函数 problemdef.c
  8. js格式化input输入框内容(每几位分一组,并使用特定字符分隔)
  9. Java Web之路(一)Servlet
  10. Visual Studio 各版本下载