Exemple #1
0
        private static void YPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs args)
        {
            DDManipulationFrameBase sender = (DDManipulationFrameBase)d;
            double newValue = (double)args.NewValue;

            Canvas.SetTop(sender, newValue);
            sender.Bounds = new Rect(sender.Bounds.X, newValue, sender.Bounds.Width, sender.Bounds.Height);
        }
Exemple #2
0
        private static void BoundsPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs args)
        {
            DDManipulationFrameBase sender = (DDManipulationFrameBase)d;
            Rect newValue = (Rect)args.NewValue;

            sender.X      = newValue.Left;
            sender.Y      = newValue.Top;
            sender.Width  = newValue.Width;
            sender.Height = newValue.Height;

            sender.OnBoundsChanged();
        }