public void MethodFillColorChangeDelta(Color value) { // Selection this.SetValueWithChildrenOnlyGroup((layerage) => { ILayer layer = layerage.Self; // Refactoring layer.IsRefactoringRender = true; layerage.RefactoringParentsRender(); layer.Style.Fill = BrushBase.ColorBrush(value); }); this.Invalidate(); // Invalidate }
public void MethodFillColorChangeCompleted(Color value) { // History LayersPropertyHistory history = new LayersPropertyHistory(HistoryType.LayersProperty_SetStyle_Fill); // Selection switch (this.FillOrStroke) { case FillOrStroke.Fill: this.Color = value; break; } this.Fill = BrushBase.ColorBrush(value); this.SetValueWithChildrenOnlyGroup((layerage) => { ILayer layer = layerage.Self; // History var previous = layer.Style.StartingFill.Clone(); history.UndoAction += () => { // Refactoring layer.IsRefactoringRender = true; layer.IsRefactoringIconRender = true; layer.Style.Fill = previous.Clone(); }; // Refactoring layer.IsRefactoringRender = true; layer.IsRefactoringIconRender = true; layerage.RefactoringParentsRender(); layerage.RefactoringParentsIconRender(); layer.Style.Fill = BrushBase.ColorBrush(value); this.StandardStyleLayerage = layerage; }); // History this.HistoryPush(history); this.Invalidate(InvalidateMode.HD); // Invalidate }