views:

47

answers:

1

I've noticed that when I make a change to the visual presentation of a window while the window is hidden, the changes are not immediately visible when the window is shown. Rather, the window appears briefly in the state it was in when it was last-visible, taking 0.5-1 seconds to display the updated form.

This can be confusing and ugly as when my window is shown, it defaults to having no items selected, yet if there were items selected when it was closed, it will appear as though those items are selected again when it is opened, only to disappear a second later.

Is there any way I can force WPF to render the window even though it is not visible, so that when it is shown it is in the correct state?

Update: Turns out this is a limitation of the operating system--apparently WPF can't access the window bitmap or something if the window is hidden. I found a workaround by setting the Opacity of the window to 0 or 1 instead of hiding/showing and it seems to work pretty well.

A: 

Turns out this is a limitation of the operating system--apparently WPF can't access the window bitmap or something if the window is hidden. I found a workaround by setting the Opacity of the window to 0 or 1 instead of hiding/showing and it seems to work pretty well.

chaiguy