print wpf window after it has been totally rendered which event?
how to a print wpf window after it has been totally rendered which event?
i have tried using loaded but some of the elements have not finished rendered yet
开发者_StackOverflow中文版thanks
Read this article it shows you that there currently is no official way of getting notified of the end of the rendering but instead shows you a trick that you could use.
I don't haev a proper solution for you, but you can make the following hack in the loaded event:
Dispatcher.BeginInvoke(new Action(delegate {
// here you are pretty shure that all rendering is done
// Put in your code here
}), System.Windows.Threading.DispatcherPriority.ContextIdle, null);
Probably it will also work with DispatcherPriority.Background, check it out.
精彩评论