protected override void OnParentMouseUp(object sender, MouseButtonEventArgs e) { if (_canMove) { if (PointOutBlock != null && !Equals(GetMoveOffSet(), 0.0d)) { if (!BlockConverter.CanConvert(PointOutBlock)) { return; } //Henry modified LayerContainer.OnRaiseAfterMouseUpEvent(this); // presenter is called //this.FindAncestor<BlockGrid>().InvalidateVisual(); // redraw blockgird only } } EndOperation(); }
private bool OnRaiseEndEditEvent(IInputElement uiElement) { if (uiElement == null) { return(false); } var arg = new CellEditRoutedEventArgs(EndEditEvent, this); uiElement.RaiseEvent(arg); if (arg.HasChanged) { //arg.ChangedSet.ForEach(x => DirtyItems.Add(x)); //_isDirty = true; LayerContainer.OnRaiseAfterMouseUpEvent(this); // 刷新控制, 重绘 } return(arg.HasChanged); }
protected override void OnParentMouseUp(object sender, MouseButtonEventArgs e) { if (PointOutBlock != null && IsMouseDragging()) { if (!BlockConverter.CanConvert(PointOutBlock)) { return; } //Henry modified //InvalidateVisual(); // do not change the order, 通过重绘改变 DropedPlacement if (!InvalidPlacement && DropedPlacement != null) { LayerContainer.OnRaiseAfterMouseUpEvent(this); } } EndOperation(); }