When creating a ControlTemplate and forgetting some required TemplateParts, the window will freeze if the broken control is loaded sometime after startup. Behind a TabItem that needs to be clicked after startup in this case. Seemed to freeze the Previewer in Rider, too, but I didn't investigate in-depth.
When the broken control is loaded while starting, a KeyNotFoundException immediately closes the program.
Describe the bug
When creating a
ControlTemplate
and forgetting some requiredTemplatePart
s, the window will freeze if the broken control is loaded sometime after startup. Behind aTabItem
that needs to be clicked after startup in this case. Seemed to freeze the Previewer in Rider, too, but I didn't investigate in-depth.When the broken control is loaded while starting, a
KeyNotFoundException
immediately closes the program.To Reproduce
Clone this repo
Run. Click the "Crash" tab. Window should be unresponsive until you try to resize it. Then it will crash.
Expected behavior
I expect a crash/exception immediately after clicking the tab instead of a window freeze.
Environment