Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Flicker showing WPF in ElementHost

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 07-15-2007   #1 (permalink)
Mark Miller
Guest


 

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
Guest


 

Re: Flicker showing WPF in ElementHost

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


 

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
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
WPF flicker in ElementHost VictorG Avalon 0 02-11-2008 08:44 PM
ElementHost resulting in black area before update Erik Rönnberg Avalon 0 09-24-2007 01:32 AM
displaying a deserialized Page in ElementHost Robert Ludig Avalon 1 03-23-2007 11:01 AM
need aero theme in ElementHost not_a_commie Avalon 1 02-19-2007 11:48 AM
Strong name validation fails for ElementHost Kevin Hoffman Avalon 1 03-07-2006 05:55 PM


Vistax64.com 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 2005-2008

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 47 48 49 50 51