How to enable resource dictionary diagnostics in WPF?

109 Views Asked by At

I'm tracking an instance of non-existing resource in WPF. What I'm given is an InvalidOperationException informing, that UnsetValue is not a proper value for Background property. However, I don't know, what is the missing resource key or where this setter resides.

I see in WPF sources, that StaticResource markup extension uses an internal WPF class called ResourceDictionaryDiagnostics to log events regarding resource lookup (see eg. lines 137,152).

Is there a way to enable this diagnostic and capture some information about failed resource lookups?

0

There are 0 best solutions below