Performance problem loading lots of user controls

Posted by codymanix on Stack Overflow See other posts from Stack Overflow or by codymanix
Published on 2011-01-08T20:51:15Z Indexed on 2011/01/08 20:53 UTC
Read the original article Hit count: 211

Filed under:
|
|
|
|

My application is loading a bunch of the same user control into a ScrollPanel. The problem is, this is very slow.

The profiler show that the method Application.LoadComponent(), which is called internally by in the designer code in the constructor of my user control, is the bottleneck. The documentation of this method says, that this method load XAML files. I alway though the compiler compiles XAML to BAML and embedds it into the assembly.

So the question is, how can I use BAML instead of XAML? Is there another way to make loading my user controls faster?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about wpf