private static void TargetTypeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var instance = (d as MultiModeEditorCommandBar);
if (instance == null) return;
Debug.Assert(e.NewValue != null, "e.NewValue != null");
instance.SetMode(MultiModeEditorCommandBarMode.Normal);
instance.UpdateAddText((AppBarTargetType)e.NewValue);
}