Just started NDepend on a WPF project. Changed the "potentially dead types" built-in query to include our System.Windows.Application derived class instead of the class called Program:
// <Name>Potentially dead Types</Name>
warnif count > 0
let canTypeBeConsideredAsDeadProc = new Func<IType, bool>(
t => !t.IsPublic &&
(t.BaseClass == null || t.BaseClass.FullName != "System.Windows.Application") &&
!t.IsGeneratedByCompiler && ...
After tackling these, I would still need to deal with lots of dead methods found by NDepend that are actually used in a WPF Binding. Any ideas how to start on this without marking all such view-model properties with an attribute?
Unfortunately all methods used by only those properties also seem to be dead code, so this query "leaks" into parts of the model, too.