Exemplo n.º 1
0
        private static void OnConstrainToParentBoundsChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            MouseDragElementBehavior mouseDragElementBehavior = (MouseDragElementBehavior)sender;

            mouseDragElementBehavior.UpdatePosition(new Point(mouseDragElementBehavior.X, mouseDragElementBehavior.Y));
        }
Exemplo n.º 2
0
        private static void OnYChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            MouseDragElementBehavior mouseDragElementBehavior = (MouseDragElementBehavior)sender;

            mouseDragElementBehavior.UpdatePosition(new Point(mouseDragElementBehavior.X, (double)args.NewValue));
        }