开发者

i can't see a context menu of WPF windows app through VNC

I can open a context menu but cannot see the opened menu list through VNC. (I know that i can open the context menu by checking the vnc ser开发者_开发知识库ver machine directly) I tested on different vnc servers / clients machines (although all of them are windows Vista), and different wpf app, but still I cant see any menu list.

Is this a reported problem? I found some information about wpf problem relating to windows desktop, but i dont know about vnc.

ADDED : I dont have this problem on windows native apps or windows forms apps under my vnc environment.


I have not read/found any known issue regarding viewing WPF applications across a remote connection. However if you think about how remote connections work I would like hazard a few guesses to the problem and even maybe a solution.

When you install any remote desktop software you really doing two things: setting up a repeater to relay input commands and adding a display adapter that acts as a frame server, i.e., instead of outputting the contents of the screen to a monitor it sends the information over the network.

As you know, WPF utilises DirectX to accelerate its rendering (GPU bound) and it is an unfortunate limitation that all graphic card acceleration does not work via remote desktop connection.

What I believe is happening in your specific case is that WPF is not falling back to using it's software rendering pipeline when it attempts to draw the context menu - perhaps because the context menu is a Popup and in a separate visual tree.

Something worth trying would be to force your WPF application to use software rendering.

void OnLoaded(object sender, EventArgs e)
{
    HwndSource hwndSource = (HwndSource)PresentationSource.FromVisual(this);
    HwndTarget hwndTarget = hwndSource.CompositionTarget;

    hwndTarget.RenderMode = RenderMode.SoftwareOnly;
}

If this does prove to be the case, you have two options: force WPF to use software rendering pipeline or try deploying a high-performance remote desktop access software solution from Hewlett Packard.

HTH,

References
- Microsoft guidelines for troubleshooting graphic issues in WPF.
- Hardware Acceleration in WPF
- HP Remote Graphics Software


Update: For others searching and finding this answer, you need change a VNC client setting to enable alpha blending. As noted by @mcdrewski that by default VNC won't detect/render alpha blended windows. Enabling alpha blending incurs a cost and you will notice the VNC client lag a bit.


The solution is: check the "Capture alpha blending" option in VNC Server's admin properties -- henon


The only way I have been able to make Alpha blended windows or menus show up in VNC is to turn off the "Blank the screen while VNC viewers are connected" option under Desktop in the VNCconfig app for the server.


Is it just happening on WPF applications or any other apps? Try to change the desktop color quality to 16 bit.


In the VNC server option look for the option named UseCaptureBlt and mark it TRUE

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜