In response to your specific questions:
Am I (potentially) doing something terrible? In particular, are there any problems with setting properties of child controls prior to InitializeComponent ()?
Most likely, your child controls are not yet available to you in the code until you called InitializeComponents. This would usually be a bad form.
What is good in this regard?
It will be a matter of taste, but as a rule, I would recommend that if you use the section provided by XAML, then I will take it as far as possible. If you are doing something that is logically related to the user interface, try doing it in XAML. This is not so much an MVVM thing, but a separation of a view from logic. Most of what you have in your sample code can be done declaratively, even if only through ValueConverters.
For example, if Foo was a DependencyProperty, you can also add it to XAML and add callbacks as part of the ValueChanged callback. Again, this is not MVVM, but it is quite fundamental to WPF.
For most other things, you probably want to wait while OnLoaded is called, instead of doing work in the constructor.
Hope this helps,
source share