private static void OnCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { CommandBehaviorBinding binding = FetchOrCreateBinding(d); binding.Command = (ICommand) e.NewValue; }