WPF: Menu items and combo boxes don't render in Windows 7 64-bit

你离开我真会死。 提交于 2019-12-11 14:03:23

问题


I'm trying to use an existing internal WPF application (I do have access to the source), but it was developed on XP and I'm using Windows7 64-bit.

When I click (for instance) the File menu, 90% of the time I see no drop-down menu at all. The menu still exists - I can use the arrow keys to navigate up and down and choose an option if I happen to know the order of the options, but nothing renders at all.

The other 10% of the time, the menu or some portion of it DOES render, but as I move the cursor up and down I get graphical corruption or disappearing options until I end up back at the "no menu is visible at all" state.

This is also true of combo boxes within the application - they show no data when I drop them down, but I can arrow down and choose an entry.

Microsoft has some advice about WPF rendering issues here but none of these steps has helped with my issue.

Edit: a coworker running Windows 7 sees the menus just fine... he has a different video card, so I'm curious whether this is video-card specific.


回答1:


This also sounds similar to an issue we had seen in XP, where comboboxes (or menus) would not display properly some of the time. There is a Microsoft hotfix (for at least one flavor of it) here, but unfortunately it is for XP and WS2003. I'm not sure if this could point you in the right direction.

The link to this hotfix was found in this MSDN thread. I am not the author of this particular link, although I do remember raising this issue some time (and a different job) ago.




回答2:


It turns out that in this specific case, the issue is only present on boxes that have a GeForce 6800 video card. Updating drivers has no effect, but switching to a 7800 makes the issue go away.

I have no idea why this is the case, and I haven't found any information online about 6800-specific graphical issues in Win7 64, but our testing and experimentation shows this is the factor that causes it.

Crazy.




回答3:


See this question. It's probably a problem with a DropShadowEffect, removing the Effect should fix the problem.




回答4:


I second that the issue is related to NVidia Windows 7 x64 drivers. Recently I had to replace my video card. Now I have Quadro FX 3400 with the latest drivers and am seeing similar behavior. WPF ComboBoxes don't render dropdown portions. I can only switch values with keyboard after a few attempts. It could be Direct2D-related issue. I also had to turn that off for Firefox to start working again.



来源:https://stackoverflow.com/questions/2653989/wpf-menu-items-and-combo-boxes-dont-render-in-windows-7-64-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!