Load and parse component xaml only once?
Posted: 26 May 2022, 08:56
I have a view where many component items (UserControls) are displayed using an ItemsControl. The DataTemplate references a UserControl I define in another xaml file. I'm finding that for every single item, it wants to reload the xaml over and over, which I assume also means parsing it over and over which is quite expensive. Is there a way to load and parse it just once other than copying the xaml into the main view?
Only thing I can think of right now is definining it in a resource file instead somehow.. Is that the best way?
Only thing I can think of right now is definining it in a resource file instead somehow.. Is that the best way?