XAML and Coded controls sample cleaned and extended