load a specified user control and its code behind on demand
jennyliu835
221
Reputation points
Hi Peter + Daisy,
As far as I can understand, the code behind of a specified user control would fail
the following code:
(UserControl)XamlReader.Load(new FileStream(_userControlFilePath, FileMode.Open));
Is there a way to load a specified user control and its code behind, just as we do with a specified page? For example,
NavigationService NS = fm.NavigationService;
NS.Navigate(new Uri("pages/Page2.xaml", UriKind.Relative));
Thanks.