This is essentially a re-state of a question I asked yesterday because the one answer I got didn't appear to understand my question so I must have been unclear. My bad.
Because WPF relies on DirectX it's very sensitive to internals of cards and drivers. I have a case where some simple WPF programs render incorrectly on one modern, brand-new PC with a major brand high-performance graphics card and current drivers. The problems go away if I disable the graphics card (so it uses the integrated grahics). So I know it's the card or drivers. These programs render fine on several other older PC's I've tried them on.
As WPF programmers are there deployment strategies or 开发者_开发知识库programming strategies we can use to minimize the risks and exposures to stuff like this? If we can't count on WPF rendering properly on major brands of PC's and graphics cards what can we do? How common are issues like this with WPF?
Original post: WPF graphics card problem
If you are having hardware-dependent rendering issues, you can work around it by forcing software rendering. (In my experience, this has almost never been necessary; in most cases of video glitches, ensuring that customers have the latest drivers has solved the problem. As a WPF developer, I don't worry about this problem.)
If you're using WPF 4, use RenderOptions.ProcessRenderMode to force software rendering for the current process.
In WPF 3.5, your only option is to disable hardware rendering for all WPF applications on by editing the registry. Create/open the HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics
key and create a DWORD value DisableHWAcceleration
with the value 0x1.
For more details, see Software Rendering Usage in WPF.
精彩评论