Use the containing type when creating a ComponentResourceKey

Proprietary

A ComponentResourceKey should name the type that declares it as its typeInTargetAssembly, because that is what tells WPF which assembly holds the resource. Corrects a mismatched typeof(...), and supplies the containing type and member when the key is created with no arguments at all.

OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.UseContainingTypeForComponentResourceKey
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.UseContainingTypeForComponentResourceKey

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.