为什么带有 DropShadowEffect 的 TextBlock 在 XP 计算机上显示纯黑色背景?
我们有一个 WPF 应用程序,其中包含以下 XAML:
<TextBlock x:Name="HeaderRightSubtitle"
HorizontalAlignment="Left"
VerticalAlignment="top"
FontSize="10"
Foreground="#FFFFFF">
<TextBlock.Effect>
<DropShadowEffect
Color="#FFCACACA"
ShadowDepth="1"
Opacity="100"
RenderingBias="Quality"/>
</TextBlock.Effect>
</TextBlock>
它在除一台 XP 之外的所有计算机(XP、Vista)上显示漂亮的阴影 > 机器在实心背面显示白色文本,矩形背景也有点偏移。 XP 与其他机器具有相同的主题。
有人经历过这种情况吗?是什么导致 DropShadowEffect 在这台机器上产生纯黑色背景?
We have a WPF application in which we have the following XAML:
<TextBlock x:Name="HeaderRightSubtitle"
HorizontalAlignment="Left"
VerticalAlignment="top"
FontSize="10"
Foreground="#FFFFFF">
<TextBlock.Effect>
<DropShadowEffect
Color="#FFCACACA"
ShadowDepth="1"
Opacity="100"
RenderingBias="Quality"/>
</TextBlock.Effect>
</TextBlock>
It shows a nice shadow on all machines (XP, Vista) except for one XP machine on which is shows the white text on a solid, back, rectangle background also a bit offset. The XP has the same theme as the other machines.
Has anyone experienced this? What could be causing the DropShadowEffect to produce a solid black background on this one machine?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
检查 XP 计算机上安装的 .Net 版本。您可能缺少 3.0 的 SP2 或 3.5 的 SP1。
Check the version of .Net installed on the XP Machine. You might be missing SP2 for 3.0 or SP1 for 3.5.
机器中装有什么显卡?您使用的是最新版本的驱动程序吗?另外,安装的 DirectX 版本是什么?如果我不得不猜测,那就是卡/驱动程序的问题。
What video card is in the machine and are you using the latest version of drivers? Also, what version of DirectX is installed? If I had to guess, it's something with the card/drivers.
我也遇到过这个问题。这是由于旧的 nVidia 卡(如果我没记错的话,是 FX5200)。经过广泛的研究,我终于发现 nVidia 在较新的驱动程序中修复了该错误,但该驱动程序并未为显卡提供,因为它太旧了(遗留)。因此,唯一的选择是要么不使用 DropShadowEffect,要么购买一张新卡。
I've had this problem too. It was due to an old nVidia card (FX5200 if I remember correctly). After extensive research I finally found out that nVidia fixed the bug in a newer driver, but that driver wasn't provided for the video card, because it was too old (legacy). So the only options were to either not use DropShadowEffect or buy a new card.