开发者

Who caused size change event?

开发者 https://www.devze.com 2023-03-25 02:16 出处:网络
My application ends up in a resize-loop at 开发者_如何学Ccertain circumstances. I can set a breakpoint in DataGrid.OnRenderSizeChanged(SizeChangedInfo sizeInfo) but the cause of the change event is un

My application ends up in a resize-loop at 开发者_如何学Ccertain circumstances. I can set a breakpoint in DataGrid.OnRenderSizeChanged(SizeChangedInfo sizeInfo) but the cause of the change event is unknown. The debugger says [External Code].

Is there a way to find out what causes the size change events?


If you attach Snoop (http://snoopwpf.codeplex.com/) to your application, you can monitor events and work out what's first causing your resize.

Also, where it says "[External Code]": if you disable "Just my code" in the debugging options, you'll see the callstack through the .NET framework code, which may give you a clue as to where the loop is coming from.

0

精彩评论

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

关注公众号