Unpinned Tool Windows and High Contrast mode

Docking/MDI for Windows Forms Forum

Posted 14 years ago by Lee Grissom - Quest Software, Inc.
Version: 2.0.0109
Avatar
In our application, when we are running in Windows High Contrast mode, our open, but hidden tool windows are rendered correctly. But when we tell the OS to switch back to normal mode, everything in our application switches back correctly, except those hidden tool windows. The Hidden tool windows are stuck in high contrast mode. All other tool windows are working just fine. It's only those tool windows that are unpinned (e.g. hidden). I ran the ActiPro Docking sample application, and everything behaves correctly there... so there's obviously a bug in our application. But I wanted to ask for any advice on how to hunt down this problem. Oh, and btw, the problem occurs exactly the same on XP and Windows 7. Thanks.

Comments (10)

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

I would expect our tool windowUI to refresh correctly. Are you sure our tool window UI isn't updating, or do you perhaps mean that it's the child controls inside the tool windows that aren't updating?


Actipro Software Support

Posted 14 years ago by Lee Grissom - Quest Software, Inc.
Avatar
It's actually just the unpinned portion of the toolwindow that renders incorrectly. Per your suggestion... I updated this post with a link to screen shots.
Click here for Screen-Shots

[Modified at 04/22/2010 10:02 PM]

[Modified at 04/22/2010 10:46 PM]
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry our forum doesn't support screenshots. You can upload it to an image sharing site and post the link to that though.


Actipro Software Support

Posted 14 years ago by Lee Grissom - Quest Software, Inc.
Avatar
I edited my earlier response to include a URL to the screen shots. Can you take a look?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Lee,

It would be my guess that for some reason that auto-hide tab control isn't repainting. What happens if you force it to repaint with a call like this:
dockManager.AutoHideTabStripPanelRight.Invalidate(InvalidationLevels.ElementAndChildren, InvalidationTypes.Paint);


Actipro Software Support

Posted 14 years ago by Lee Grissom - Quest Software, Inc.
Avatar
Okay, I'm able to easily reproduce now with the Actipro Sample Docking application.

Here are the screen shots

Reproducible Steps (Windows 7 and Visual Studio 2008)
1. Build and run the TestApplication that comes with Actipro UI Studio.
2. In the first window, select the "Dock Controls" item and click the "Launch Sample" button.
3. When the Dock Sample window appears, redock any Tool Window to the RIGHT side of the application (refer to my screen shots above for example).
4. Now unpin that Tool window so that it's hidden away.
5. Via the Windows control panel, switch the theme to High Contrast mode. This procedure varies between different versions of Windows, but on my Windows 7 machine, the simple shortcut is LeftShift+LeftAlt+PrtScr. Or you can Goto the Personalization applet from the Control Panel and choose a specific High Contrast Theme there.

6. Notice now that the unpinned tool window did not correctly switch to high contrast mode. You can hover over the hidden tab and see that the content switched, but not the hidden panel.
7. Go ahead and toggle out of High Contrast mode back to normal theme mode.
8. Now notice that the unpinned panel switched INTO High Contrast mode. How weird is that?!

Note, that at this point if you close and re-open the Dock Sample Window, then everything will work fine as expected.

[Modified at 04/28/2010 03:30 PM]
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Lee,

I tried your exact steps but it was updating ok for me. Everything looked as it should.

I looked at the code and it should be repainting the auto-hide tab strips with code similar to what I pasted in my last post whenever it detects a renderer change.

I am curious if you tried executing the code I pasted to see if that helps your scenario?


Actipro Software Support

Posted 14 years ago by Lee Grissom - Quest Software, Inc.
Avatar
I verified the steps with my boss on his computer, and it's reproducible no problem. Isn't that how software goes? :-) I'm tempted to make a video showing the steps to ensure more accuracy in reproduction.

I did not try the code b/c I didn't understand where it would go. Could you clarify where to paste the code?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Just FYI, I was trying to repro it on Win7 x64.

I would just add that code to a button or menu item click event handler. Just so you can click something after the theme change to kick it in and see if it makes a difference.


Actipro Software Support

Posted 14 years ago by Lee Grissom - Quest Software, Inc.
Avatar
We're running both 32-bit and 64-bit Windows 7. Same problem on both machines. I've also reproduced on Windows 2003 and Windows XP, with the same steps.

Per your suggestion, I added a button to the Dock Sample application, and had it execute the code you suggested, but it didn't do anything.

I've also discovered that the problem is not specific to high contrast theme. It's clearly evident in the normal Windows theme. I've updated my previous link to the screen shots, to include an additional screen shot taken on a Windows XP machine. It illustrates the problem right away without attempting to change themes. The Left side of the application is drawn in 0xEDEAD9, and the right side is drawn in 0xF7F6EF.

[Modified at 04/29/2010 02:56 PM]
The latest build of this product (v24.1.0) 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.