I have a solution with three projects. One is for Testing using CodedUI, the other is a WPF Viewer application that shows the data from the tests, and the third is a project of Models.
If I set the WPF project to be the start up project in the solution and run it in debug mode the theme shows up just fine.
If I attempt to start the WPF MainWindow from the Test Project, everything shows the same, without the Theme. When the test project wants to show the data it does so by firing an event to this method in the WPF project.
public static class Start
{
public static EventHandler<List<SomeData>> NewData = ShowData;
private static void ShowData(object sender, List<SomeData> e)
{
MainWindow.NewData(sender, e);
var mw = new MainWindow();
mw.ShowDialog();
}
}
I have single stepped through this code, the data arriving and the mainwindow coming up just fine. But why wouldn't the code above include the theme?
There are no loading errors in output window.
The App.XAML is where the reference to the theme is located. But it is also where the StartupURI is located which is MainWindow.XAML. Do I need to somehow start App.XAML to get the theme?
Please advise...