开发者

print wpf window after it has been totally rendered which event?

开发者 https://www.devze.com 2023-02-06 00:22 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消