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_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            TreeView element = sender as TreeView;

            if (element == null)
            {
                return;
            }
            ICommand cmd   = ControlAttachProperty.GetTreeViewSelectionChanged(element);
            object   param = element.SelectedItem;

            cmd.Execute(param);
        }
Ejemplo n.º 3
0
        private static void Element_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Selector element = sender as Selector;

            if (element == null)
            {
                return;
            }
            ICommand cmd   = ControlAttachProperty.GetListSelectionChanged(element);
            object   param = element.SelectedItem;

            cmd.Execute(param);
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
0
        private static void Element_Drag(object sender, DragEventArgs e)
        {
            UIElement element = sender as UIElement;

            if (element == null)
            {
                return;
            }
            ICommand      cmd   = ControlAttachProperty.GetDrag(element);
            List <object> param = new List <object>();

            param.Add("Drag");
            param.Add(e);
            cmd.Execute(param);
        }