Flickering when resizing and Docking:Workspace is a WinFormsHost

Docking/MDI for WPF Forum

Posted 11 years ago by Mark Foti
Version: 12.2.0573
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Avatar

Dear ActiPro-Community,

I have an application that use ActiPro Docking. The Docking:Workspace item is a WinFormsControl inside a WinFormsHost. When I resize the window, it just flickers very ugly ... I will attach a sample application and a video showing the issue.

Is there any way to workaround it?

Best Regards

Michael

Comments (4)

Posted 11 years ago by Mark Foti
Avatar

Sry, bothering you here. I looks like I cannot upload my stuff here. I created a support ticket.

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

Hi Michael,

Thanks for the sample.  It looks like the problem might be the transparent background on the UserControl.  If you set a Background on the Grid in the UserControl, it seems to work much better for whatever reason.


Actipro Software Support

Posted 11 years ago by Mark Foti
Avatar

Hi,

I have tried your solution but I don' get any improvement on the flickering and on the black border on the right side.

<UserControl x:Class="FlickeringIssue.UserControl1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
             Background="White">
    <Grid Background="White">
        <WindowsFormsHost Background="White">
            <wf:PropertyGrid />
        </WindowsFormsHost>
    </Grid>
</UserControl>

Am I doing something wrong? How can I further improve it.

Best regards

Michael

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

Hi Michael,

All I did from your sample was set the Grid Background like you did.  Before I did that, the transparency on the WinForms PropertyGrid slowed everything way down, and caused flicker by its splitter.  After I did it, there was no more flicker and resizing speed performance was dramatically better.

I don't see any artifacting while resizing any more after that one change.  If you are referring to a black area that temporarily shows on the far right when you drag the window's right border to expand it, I'm not seeing that but that is something with WPF in general.  Basically as a window expands, if the layout hasn't yet "caught up", the black area is the background behind where WPF renders.  Then as soon as the WPF layout catches up, it renders over it.

You might want to consider looking at our own WPF PropertyGrid control if you are going to use WPF.  It's built natively in WPF and offers many of the same features the WinForms one does.


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.