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.
精彩评论