Is there a way to manipulate xaml file in c# programmatically at runtime? -
the aim of project manipulate xaml code convert existing xaml uwp code different platform xaml code. appreciated.
streamreader stream = new streamreader("path xaml file"); frameworkelement root = xamlreader.load(stream.basestream) frameworkelement; the issue here xaml file contains x:class apparently cannot load in runtime. there better way manipulate attributes.
you can combine xamlreader.load , xamlservices.parse load , parse xaml files programmatically:
https://msdn.microsoft.com/en-us/library/system.xaml.xamlservices.parse(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/ms590388(v=vs.110).aspx
https://blogs.msdn.microsoft.com/ashish/2007/08/14/dynamically-loading-xaml/
Comments
Post a Comment