Пример #1
0
 private void RectangleLeftMouseButtonDown(object sender, MouseButtonEventArgs e)
 {
     if (_movedSimpleObject != null)
         return;
     var rectangle = sender as Rectangle;
     if (null == rectangle)
         return;
     _movedSimpleObject = rectangle.DataContext as SimpleObject;
     _movedSimpleObject.BorderBrush = Brushes.Orange.ToString();
     _lastPosition = Mouse.GetPosition(this);
 }
Пример #2
0
 private void Window_OnMouseUp(object sender, MouseButtonEventArgs e)
 {
     if (null != _movedSimpleObject)
         _movedSimpleObject.BorderBrush =_movedSimpleObject.Brush;
     _movedSimpleObject = null;
 }
Пример #3
0
 public void RemoveSimpleObject(SimpleObject simpleObject)
 {
     Objects.Remove(simpleObject);
 }
Пример #4
0
 public void RemoveSimpleObject(SimpleObject simpleObject)
 {
     Objects.Remove(simpleObject);
 }