Reputation: 12516
How can I create Window
instance from XAML file? In directory are located different XAML files (custom windows). I need load necessary XAML and show it. Is exists method as Window.LoadFromXAML
?
Upvotes: 1
Views: 911
Reputation: 754
You can do it with XamlReader.Load. It returns the root of the corresponding object tree. In your case the instance of Window class.
Upvotes: 2