When the properties are bound in code behind, they are not updated as they are supposed to. Binding them in XAML, by setting the DataContext of the control as StaticResource, works as expected.