RibbonWindow causing problems if VNC Client is connected

Ribbon for WPF Forum

Posted 7 years ago by Ansgar
Version: 16.1.0632
Platform: .NET 4.6
Environment: Windows 7 (64-bit)
Avatar

Hi,

I have a problem if I use the RibbonWindow for hosting my Ribbon, WindowsFormsHost and other Controls (statusbar, no Docking) and an active VNC connection is present (modified UltraVNC Server using MirrorDriver, I don't have access to the source).

If an VNC connection is active, the WindowsFormsHost output (OpenGL Rendering) is not fluent on the host(VNC Server). But on the client it is.
The screen area of the WindowsFormsHost seems to be only updated after some focus change (on the vnc host).

If I change the RibbonWindow to "normal" WPF Window its working fine. Rotation of OpenGL scene works as expeted on both (host and server) while VNC connection is active.

Can you imagine where this comes from? I woul really like to use the RibbonWindow because of the better visual appearence etc.

Best regards,
Ansgar

[Modified 7 years ago]

Comments (9)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

I'm sorry you are running into trouble here.  RibbonWindow effectively uses WindowChrome behind the scenes to alter the default rendering of the window non-client area so it is themed.  But that shouldn't really affect the client area rendering.  We have numerous customers using WindowsFormsHost in our chromed windows.  But with the VNC portion of the equation, I'm not sure how that affects things.

Could you do a quick check on a normal WPF Window by applying a WindowChrome?  Please add this to your normal Window:

xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"
...
<themes:WindowChrome.Chrome>
	<themes:WindowChrome />
</themes:WindowChrome.Chrome>

Then see if the problem still occurs.  I would expect that it would if it happens in RibbonWindow.

Also see if it happens in both Aero and a Metro theme, or just one or the other.  Thanks!


Actipro Software Support

Posted 7 years ago by Ansgar
Avatar

Hi,

thx for your quick answer.
I already tried the WindowChrome. This leads to the same error.

I will now try if different Themes make a difference.

Best regards and thx for help,
Ansgar

Posted 7 years ago by Ansgar
Avatar

Hi again,

I tested now different Themes:

* MetroLight -> issue as described above happens
* AeroNormalColor -> issue is *not* there
* Classic -> issue is not there either

So it seems to be related to the Metro Theme Window Chrome...

As a workaround for the moment I will switch to the AeroNormal then. But it would be relly nice if it could be fixed.

Best regards,
Ansgar

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Thank you for the information.  That is an interesting result.  The only difference between those themes is that the Metro theme has a transparent window (located behind the chromed window) that provides the outer glow and allows for resizing outside of the outermost border.

Can you try the Metro theme again but this time on you WindowChrome, set HasOuterGlow="False".  See if the problem goes away then?


Actipro Software Support

Posted 7 years ago by Ansgar
Avatar

Hi,

With 'HasOuterGlow="False"' the problem goes away.

The RibbonWindow does not have this option, right? And for the normal Window with Chrome the resizing is harder to trigger.

Thank you again for your help.

Best regards,
Ansgar

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Ansgar,

Ok so it must be the presence of that semi-transparent window (which renders the outer glow) that is causing the issue then.

RibbonWindow does use a WindowChrome behind the scenes.  It's just you can't declare a WindowChrome on it like you can on normal windows.  In code-behind after InitializeComponent, you'd need to do:

var chrome = WindowChrome.GetChrome(this);
// Set options here

Yes if you turn off HasOuterGlow in a Metro theme, it will only have a single pixel resize border.  You can manually increase that by setting the WindowChrome.ResizeBorderThickness property to something like 4 (or more if needed). 


Actipro Software Support

Posted 7 years ago by Ansgar
Avatar

Thx. I forgot that one can get to the Chrome like that.

It seems that setting the ResizeBorderThickness has no real effect for the Metro theme. Can it be that this has no effect because its only used kind of "inside the glow"?

Best regards,
Ansgar

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Ansgar,

The ResizeBorderThickness only affects from the outer visible border inward.  Setting it to 4 should mean that outer border line and 3 pixels in from that.


Actipro Software Support

Posted 7 years ago by Ansgar
Avatar

You are right. Thx a lot for your help.

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.