I have multiple XAML files containing a UserControl (they are SVG images converted to XAML). In C#, to have that image in a Grid for example, I would use a XamlReader and add the root element to the grid's children.
StreamReader sr = new StreamReader("example.xaml");
UIElement rootElement = (UIElement) XamlReader.Load(sr.BaseStream);
theGrid.Children.Add(rootElement);
How can I do the same in XAML (where I would use a path to the image XAML from a binding)?
I am looking for this approach in order to follow the MVVM principle of separating UI from code.