Search code examples
wpfpreviewvisualbrush

Preview of a window (Visualbrush) that is not visible


I've created a window dynamically 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?


Solution

  • 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.