February 26th, 2014, 07:12 AM
question about reading from xaml files.
I have this situation.
I have such a window, where the names of Topics are beiing generated from .xaml files, like this
the names of topics are being generated by this code
var fileNames = Directory.GetFiles(Environment.CurrentDirectory, "Topic?.xaml");
this.Topics = new List<Topic>();
foreach (var fileName in fileNames)
var topic = new Topic();
using (FileStream fs = new FileStream(fileName, FileMode.Open))
var page = (Page)XamlReader.Load(fs);
topic.Page = page;
Now , for example the topic1.xaml file is this.
Now, I want when the appropriate Topic is clicked, for example Topic 2, the topic2.xaml is opening in new window, and if 3-rd is clicked the topic3.xaml is showing on new window.
Thanks guys for any help.
Click Here to Expand Forum to Full Width