← All recipes
Moderne licensed

Register a name and an owning type for a RoutedCommand

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Wpf.RegisterRoutedCommandNameAndOwnerArtifactOpenRewrite.Recipes.CSharp.CodeQuality

A RoutedCommand or RoutedUICommand created with the parameterless constructor has no name and no owner type. Registers the containing member and the containing type; for a RoutedUICommand the display text is filled in with "PLACEHOLDER TEXT", matching WpfAnalyzers, because the source contains nothing to derive it from.

Single recipecsharpcode-qualityProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.RegisterRoutedCommandNameAndOwner

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality