I am adding a decent amount of elements represented by a UserControl in a ListView. This means that for each element in the ListView, one instance of the UserControl is created to display. I want this UserControl to be accessible only for my own assembly, and thus I have made it internal rather than public. The problem, however, is that WPF seems to recompile the XML each time when marked as internal, as opposed to the one-time-compile-and-cache behaviour you get when it is public. How can I get the same performance with an internal view?
Share
Making your constructor public, rather than internal, will make sure WPF will cache the XAML.