Add [TemplatePart] for a looked-up template part

Proprietary

A GetTemplateChild("PART_X") call in OnApplyTemplate is an undeclared dependency on the control template. Adds [TemplatePart(Name = ..., Type = ...)] to the control for every part it looks up but neither it nor a base control declares.

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

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