I have a problem with wpf. The problem is my window, which uses some auto
and *
columns in a Grid
, it is opening very slow. I've used the Visual Studio debugger to investigate what the trouble is, and found it in the layout section. The message is:
Changes were made to XAML visual tree that required the size and/or position of all affected elements to be computed.
Here is a screenshot of the debugger:
What is the best way to detect the exact problem with the layout? Or are there some general rules I could follow?
Thank you very much, I did not experience this behaviour with wpf before, even with large usercontrols / windows...
EDIT
I don't use any animation of transformation to rotate controls. In general it is a very flat window. As an additional information, scrolling through GridView
s in the window is also very slow.
Off the top of my head (and re-iterating a few of the comments):
IsSharedSizeScope
? This can cause cascading layout updates.I had the same issue. The reason was accidentally switched OFF virtualization in ListView in XAML file. Probably copy/paste from web. Changing from false to true made the magic.
VirtualizingPanel.IsVirtualizing="True"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With