Reputation: 27
I'm new to WPF and have a question which quite same with the article: "Walkthrough: Debug a WPF window or Windows Form without running your application".
I will take the picture as an example: http://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/DebugaWPFwindoworWindowsFormwithoutrunni_FD38/image_3.png
From the picture, the project have 4 WPF windows such as:
When every time in VS 2010, I click on the starting debugging (F5) or start without debugging(Ctrl + F5) will always run the MainWindows.xaml. What the reason coz this? Is this because of in the App.xaml that we declare StartupUri="MainWindow.xaml".
Can I run the particular WPF windows such number 4. ViewChart... so on.xaml instead of the whole application(*Such as the MainWindows.xaml)?
Upvotes: 1
Views: 3667
Reputation: 22323
The article you linked is out of date and the video that demonstrates his solution is no longer hosted. However, the basic steps that were outlined in the video are still possible, though the process can be more trouble than it's worth.
The process is as follows:
ShowDialog()
method on your Immediate instance.The main trouble with this method of debugging is that if your window has a complex constructor or has dependencies on external objects, you may end up spending more time setting up the dependencies than just navigating to the page would have taken.
Upvotes: 6