tags:

views:

196

answers:

3

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 server 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.

A: 

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

Kai Wang
only on WPF apps. Other native windows apps or windows Form apps do not have this problem in my VNC environment.
tk
I just tried to lower the color quality and it does not work.
tk
+1  A: 

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

Dennis Roche
+1 I was going to suggest that WPF might be using hardware rendering which wouldn't be transferred along the pipe. This provides the problem and a potential solution. Good answer...
Evan Plaice
Thank you for your answer. I tried to render whole application or only the context menu with SortwareOnly mode, but neither solved the problem.
tk
I found a solution. I just needed to check 'enable alpha blending'. I got this from this blog. http://mikestedman.blogspot.com/2009/02/wpf-transparent-windows-and-vnc.html . Anyway, i selected your answer. thnx.
tk
@tk: Do you mean the `AllowTransparency` property on the root element?
Dennis Roche
@tk: By the way, thanks for selecting the answer. I'm happy you figured out the problem.
Dennis Roche
A: 

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

henon