Exemplo n.º 1
0
        private void ClonUserControl(Point point)  //клонирование
        {
            SqareVM      square       = sprites.DataContext as SqareVM;
            SqareVM      sq           = (SqareVM)square.Clone();
            UserControl1 userControl_ = RetUser(sq, point);

            Repositories.ListUserControl.Add(userControl_);
            Cache.NowModel.CurrentWindow.Compilar.Children.Add(userControl_);
            Canvas.SetLeft(userControl_, point.X);
            Canvas.SetTop(userControl_, point.Y);
        }
Exemplo n.º 2
0
        private void ClonUserControl()  //клонирование
        {
            SqareVM      square       = userControl.DataContext as SqareVM;
            SqareVM      sq           = (SqareVM)square.Clone();
            UserControl1 userControl_ = RetUser();

            Cache.NowModel.CurrentWindow.Compilar.Children.Add(userControl_);
            //    InforOfSprites.ListUserControl.Insert(n,userControl_);

            Canvas.SetLeft(userControl_, posNow.X);
            Canvas.SetTop(userControl_, posNow.Y);

            userControl = userControl_;
        }