private static void Element_LostFocus(object sender, RoutedEventArgs e) { UIElement element = sender as UIElement; if (element == null) { return; } ICommand cmd = ControlAttachProperty.GetLostFocus(element); object param = ControlAttachProperty.GetCommandAttachParam(element); cmd.Execute(param); }
private static void Element_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { UIElement element = sender as UIElement; if (element == null) { return; } ICommand cmd = ControlAttachProperty.GetControlLeftButtonUp(element); object param = ControlAttachProperty.GetCommandAttachParam(element); cmd.Execute(param); }