We have loose Xaml loading non prism and we have prism loading different views using unity containers. What I am looking for is how to properly read a XAML usercontrol loose file and have it injected into the containers.
We currently get the xaml into a dependency object and locate a content container on our window and assign it to that. Since we are not dealing with a window now, just the view, what do we need to do.
Currently we have the following executed:
Function() Me.container.Resolve(Of ModuleControl)())
I want to replace the modulecontrol view with a loose xaml file we have called MC_loose which has a usercontrol defined in it.
I am trying some things out for general proof of concept, I really need the VB code to get the xaml in and tied to the region.
We are loading the xaml for the window based method using the following:
Dim rootElement As DependencyObject
Using fs As New FileStream("MC_loose.xaml", FileMode.Open)
rootElement = CType(XamlReader.Load(fs), DependencyObject)
and then assigning it to a content control.content that is looked up on the window.
Thanks for any code samples,