WPF - Windows 7 - 64 位 - 未呈现内容 [英] WPF - Windows 7 - 64bit - No content rendered

查看:23
本文介绍了WPF - Windows 7 - 64 位 - 未呈现内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发机器:Windows 7 64 位桌面.Visual Studio 2008 专业版.

Dev machine: Windows 7 64bit desktop. Visual Studio 2008 Professional.

不确定原因是什么,但行为是这样的:我可以在这个桌面上用 VS 开发就好​​了.已经完成了一些类库和 Windows 窗体,从我所看到的来看没有任何问题.但是,在 WPF 项目中,当我运行项目时,我无法在窗口中呈现任何内容.一个简单的 wpf hello world 如下:

Not sure what the cause is but the behavior is this: I can develop in VS on this desktop just fine. Have done some class libraries and windows forms with no issues from what I have seen. However in WPF project I cannot get any content to render in window when I run the project. A simple hello world in wpf like this:

<Window x:Class="test"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Hello" Height="300" Width="300">
<Grid>
    <TextBlock Text="Hello World" />
</Grid>

渲染一个白色背景的空窗口.另外,我注意到如果我调整窗口大小,白色区域不会随着窗口正确调整大小.这是图形驱动程序问题还是框架安装问题?

Renders an empty window with a white background. Also, I have noticed that if I resize the window the white area does not resize correctly with the window. Is this a graphics driver issue or a framework install issue or?

推荐答案

正如 Anderson Imes 在他的评论中所提出的,它最终是我在 NVidia 发布新的、据称与 Windows 7 兼容的驱动程序之前安装的显卡驱动程序7 月 7 日.更新了驱动程序,Hello World 重新开始营业.

As proposed by Anderson Imes in his comments, it ended up being the Video card drivers which I had installed before NVidia released a new, supposedly Windows 7 compliant, driver on July 7th. Updated the drivers and Hello World is back in business.

这篇关于WPF - Windows 7 - 64 位 - 未呈现内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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