private void ResizableRect_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            Point  p = ResizableRect.TranslatePoint(o, DrawLineAndPoint);
            double w = ResizableRect.Width;

            if (p.X < 0)
            {
                //this.SetValue(ResizableRect,
                Canvas.SetLeft(ResizableRect, 0);
                ResizableRect.Width += p.X;
                return;
            }
            else if (p.X + ResizableRect.Width > this.DrawLineAndPoint.Width)
            {
                Canvas.SetRight(ResizableRect, this.DrawLineAndPoint.Width);
                ResizableRect.Width -= ResizableRect.Width - this.DrawLineAndPoint.Width + p.X;
                return;
            }
            Size newsize = e.NewSize;

            SelectedData.Vect1 = p.X * this.everyDisForPiexl.Vect1;
            SelectedData.Vect2 = (p.X + newsize.Width) * this.everyDisForPiexl.Vect1;
            //NOTICE: invoke event here!
            PassValuesEventArgs args = new PassValuesEventArgs(SelectedData);

            this.PassValuesEvent(this, args);
        }
 public void OnPassValues(object sender, PassValuesEventArgs e)
 {
     SelectedData = e.vect;
     if (this.SelectedData.Vect1 != SelectedData.Vect2)
     {
         this.AppendData();
     }
     //NOTICE: values are passed here
 }