Problem

RibbonWindow causing problems if VNC Client is connected

Posted 1 year ago by Avatar Ansgar

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 1 year ago]


Comments (9)

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA

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 1 year ago by Ansgar

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 1 year ago by Ansgar

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 1 year ago by Actipro Software Support - Cleveland, OH, USA

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 1 year ago by Ansgar

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 1 year ago by Actipro Software Support - Cleveland, OH, USA

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 1 year ago by Ansgar

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 1 year ago by Actipro Software Support - Cleveland, OH, USA

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 1 year ago by Ansgar

You are right. Thx a lot for your help.

Information The latest build of this product (2018.1 build 0672) was released 2 months ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.