Ok, so I just wasted an hour hunting why my lookless WPF control wasn't showing up in the Window.
Eventually, i traced it to the fact that I forgot to add the ResourceDictionary entry in the generic.xaml file under the themes directory. The style and the class itself was OK.
Is there a way to trace what is going on inside WPF? How to trace how a style gets loaded (or NOT loaded). I imagine that must become a huge stack of stuff to look at, but there has got to be better than having to check each and every file for typos or stuff i forgot.
(I've searched for other questions but there's mostly for a specific case)
Thanks!
For WPF in . NET Framework, data binding failures must be shown in the debug output for the XAML Binding Failures pane to detect and show them. The option for this is in the Tools > Options > Debugging > Output Window > WPF Trace Settings dialog.
This may not help with your particular problem, but Snoop is a great tool for debugging WPF applications.
This is also a bit unrelated to the issue you mentioned, but I've also found that you need to keep an eye on memory usage when working with WPF (especially when you're getting started), since it's pretty easy to keep unintended references to objects. Red Gate's memory profiler is an amazing tool for this.
Well, there is nothing as sophisticated as debugging a c# code in visual studio, but there are a few ways;
http://rrelyea.spaces.live.com/Blog/cns!167AD7A5AB58D5FE!1625.entry http://geekswithblogs.net/lbugnion/archive/2007/03/14/108728.aspx http://blogs.devsource.com/devlife/content/silverlight/debugging_dynamic_xaml_in_silverlight_1.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With