Use nameof() instead of a string literal
ProprietaryRegistering a DependencyProperty, RoutedEvent or RoutedCommand with a string literal silently breaks when the corresponding member is renamed. Replaces the literal with nameof(...) when a member of that name exists on the containing type.
OpenRewrite. Recipes. CSharp. CodeQuality. Wpf. UseNameofInsteadOfLiteralmod run . --recipe= OpenRewrite. Recipes. CSharp. CodeQuality. Wpf. UseNameofInsteadOfLiteralInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.