views:

169

answers:

1

Hi.

I've created a window dinamically that's is in memory but is not visible yet. In other window I want to show a little preview of this window. I'm triying using a visualbrush to achieve this, setting the visual property of the visualbrush.

It works perfectly with a visible window, but if the window is not visible, the visualbrush don't shows anything.

What can I do to show a Preview?

A: 

Finally, I did it creating the visualbrush from the main grid of the window instead of the window itself. It works no matter if the window is visible or not, but I'm not sure if it's the right way for doing it.

Jonathan
I think it was the only solution, because the Grid by itself is visible, I think that is you set Visibility="Collapsed" to your grid, you would fall in the same problem.
Nicolas Dorier
@Nicolas Dorier: Yes, but the image that the grid generate is not the same of the one generated by the window. I will try to synchronize the height and width of the grid with the ones from the window...Maybe it helps, but i'm not sure. Even if it's works, I think it's not an elegant solution.
Jonathan
a quick and dirty solution would be to move your windows out of the client screen. It would be easier I guess
Nicolas Dorier