Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Flicker showing WPF in ElementHost

 
 
Old 07-15-2007   #1 (permalink)
Mark Miller


 
 

Flicker showing WPF in ElementHost

I'm using hosting WPF content inside a System.Windows.Forms.Integration.ElementHost, and that's sitting inside a Win32 control that's part of a tabbed document interface. Crazy, eh?

I notice a painfully obvious flicker when I do the following:

1. Update content on the WPF page while it is inactive (e.g., another document is selected)
2. *Immediately* (programmatically) activate the WPF page.

The flicker I see is the *previous* WPF content (before my update) of the ElementHost.

If I skip step 2 and activate the page by hand, there is no flicker.

I've tried all manner of calls to SuspendLayout, ResumeLayout, and Update on the ElementHost, and yet the flicker persists.

I'm working on the fastest machine known to man (well, it's real close), so expectations are high.

Any help or clues pointing me to something useful would be greatly appreciated. Thanks in advance.

Best regards,

Mark Miller - Developer Express
C# MVP

My System SpecsSystem Spec
Old 07-17-2007   #2 (permalink)
Lloyd Dupont


 
 

Re: Flicker showing WPF in ElementHost

how about InvalidateVisual() or InvalidateVisual()?
My System SpecsSystem Spec
Old 07-20-2007   #3 (permalink)
Mark Miller


 
 

Re: Flicker showing WPF in ElementHost

That also fails to affect the flicker.

Stepping through the code, the update to the WPF content all happens first, then there's the call to InvalidateVisual(), and then I activate the tab holding the WPF.

I still see the old content for about 1 second, and then the new content appears.

Any other ideas?

Best regards,

Mark Miller - Developer Express
C# MVP
"Lloyd Dupont" <net.galador@ld> wrote in message news:%23I9PoMGyHHA.5276@TK2MSFTNGP02.phx.gbl...
how about InvalidateVisual() or InvalidateVisual()?
My System SpecsSystem Spec
 

Thread Tools



Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46