Changing Screen Resolution & screen Rotation

Ribbon for WPF Forum

Posted 10 years ago by Brett Knapik
Version: 13.2.0592
Platform: .NET 4.5
Environment: Windows 8 (64-bit)


We are doing system testing of our application before we ship. We have noticed on some computers there is a bit of a problem with going from a smaller resolution to a larger resolution. Here is an example of a window that went from 800x600 to 1920x1080:

Notice how there is a large black area where the window is supposed to layout. Even if you shrink then maximize the window, the black area remains. We do not know why this happens, however, We noticed that it does not happen with all machines. We have identified that it always happens on a Surface Pro 1 and I imagine the 2 as well. This happens in our application as well as the sample applications shipped with the Ribbon SDK.

There is a related problem with Screen Rotation as well on the surface. Here is what the SDK sample looks like when it is in landscape orientation:

Here is the result of the window when the Surface Pro is rotated to portrait orientation:

To attempt to solve this, I added the following to my ribbon window:

Microsoft.Win32.SystemEvents.DisplaySettingsChanged += (o, args) => this.UpdateLayout();

The event does indeed fire. However it does not fix the layout of the window.

Any insight on how to fix the problem would be helpful.

Thanks. Brett

Comments (1)

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

Hi Brett,

This is something we are aware of and has been a particularly frustrating issue.  There is a description of our findings in this thread:

The summary is that we have to handle WM_GETMINMAXSIZE so that we don't cover up an auto-hidden taskbar.  But then if we handle that WM_GETMINMAXSIZE message, it introduces this issue you see.  We were able to reproduce it in a simple project that doesn't even use our controls, simply by handing that message.  So far we haven't found a workaround short of not handling WM_GETMINMAXSIZE.

But this did give us an idea that were just tried.  We updated our WM_GETMINMAXSIZE handler to effectively not do anything if it detects the taskbar is not auto-hidden.  This fixes the issue you reported in scenarios where the taskbar is not auto-hidden, which is most common.  If you would like to help test this update, please write our support address and reference this post.

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.