-
February 26th, 2014, 08:12 AM
#1
question about reading from xaml files.
Hello Guys.
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;
}
this.Topics.Add(topic);
}
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.
Romo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|