Disabling Minimize and Maximize buttons in a WPF Window

An elegant way to restore a feature lost with WPF: Disabling Minimize and Maximize buttons in a WPF Window – Unknown Recipes.

This is done using attached properties triggering Win32 legacy code.