DependencyPropertyKey member must be declared before DependencyProperty member

Proprietary

A DependencyProperty initialized from <key>.DependencyProperty must be declared after that DependencyPropertyKey, because static initializers run in declaration order and the key would otherwise still be null. Moves the key above the property.

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

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