예제 #1
0
 private void InitializeSelectedBorder()
 {
     mySelectedBorder = new SelectedBorder();
     selectedCanvas.Children.Add(mySelectedBorder);
     FrameworkElement element = ListObject[SelectedIndex];
     Point pt = element.TranslatePoint(new Point(0, 0), selectedCanvas);
     mySelectedBorder.Width = element.Width;
     mySelectedBorder.Height = element.Height;
     mySelectedBorder.X = pt.X;
     mySelectedBorder.Y = pt.Y;
 }
예제 #2
0
        private void MoveXY(SelectedBorder element, double toX, double toY, double width, double height)
        {
            PennerDoubleAnimation daX = new PennerDoubleAnimation()
            {
                To = toX,
                Equation = Equations.QuartEaseOut,
                Duration = TimeSpan.FromSeconds(0.5)
            };
            PennerDoubleAnimation daY = new PennerDoubleAnimation()
            {
                To = toY,
                Equation = Equations.QuartEaseOut,

                Duration = TimeSpan.FromSeconds(0.5)
            };
            PennerDoubleAnimation daW = new PennerDoubleAnimation()
            {
                To = width,
                Equation = Equations.QuintEaseOut,
                Duration = TimeSpan.FromSeconds(0.3)
            };
            PennerDoubleAnimation daH = new PennerDoubleAnimation()
            {
                To = height,
                Equation = Equations.QuintEaseOut,

                Duration = TimeSpan.FromSeconds(0.3)
            };
            element.BeginAnimation(Canvas.LeftProperty, daX);
            element.BeginAnimation(Canvas.TopProperty, daY);
            element.BeginAnimation(WidthProperty, daW);
            element.BeginAnimation(HeightProperty, daH);
        }
예제 #3
0
 private void InitializeSelectedBorder()
 {
     mySelectedBorder = new SelectedBorder();
     selectedCanvas.Children.Add(mySelectedBorder);
     MoveBoderTo();
 }