It becomes tedious to maintain code just for design-time support, so I use a `DesignTimeViewModelLocator` class for binding sample data in the designer.
The WPF text run does not have a visibility property. Here's a simple trick, using an attached property, to add that functionality.
In this post, I will give you some tips on how you can debug your data bindings in WPF. I'll show you how to add trace output and break into the debugger.
You can write inline C# in your XAML file with the x:Code Intrinsic type. But it might not be such a great idea.
Instead of one TextBox control for the code, we have 4 TextBox controls. As the user types in each digit, we move focus to the next TextBox for them.