c# - How to dynamically load Page from xaml file/resource? -


in codebehind, need load page object xaml resource, , explicitly need result instance of object of page class. have searched around , found solutions involving xamlreader , such, looked bit weird , complicated, hacks. there simple , "normal" way it?

page p = (page)application.loadcomponent(new uri(@"relative/uri/to/xaml/file.xaml", urikind.relative)); 

see msdn reference page few more details


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -