Hello Guys.

I have this situation.
Name:  1.png
Views: 108
Size:  5.6 KB


I have such a window, where the names of Topics are beiing generated from .xaml files, like this
Name:  1.png
Views: 114
Size:  39.8 KB


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.

Name:  1.png
Views: 121
Size:  99.2 KB

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