Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }