void OnUndoCompleted(object sender, UndoUnitEventArgs e) { // If an action had caused the errorview to be shown, and undo was executed after that // try to put back the viewmanagerview back as the rootview of the designer. // may be the undo might help recover from the problem. if (!this.view.Children.Contains((UIElement)this.viewManager.View)) { this.view.Children.Clear(); this.view.Children.Add((UIElement)this.viewManager.View); if (this.outlineView != null) { this.outlineView.Children.Clear(); this.AddOutlineView(); } // Clear out the error condition ErrorItem errorItem = this.context.Items.GetValue <ErrorItem>(); errorItem.Message = null; errorItem.Details = null; } }
void OnUndoCompleted(object sender, UndoUnitEventArgs e) { // If an action had caused the errorview to be shown, and undo was executed after that // try to put back the viewmanagerview back as the rootview of the designer. // may be the undo might help recover from the problem. if (!this.view.Children.Contains((UIElement)this.viewManager.View)) { this.view.Children.Clear(); this.view.Children.Add((UIElement)this.viewManager.View); if (this.outlineView != null) { this.outlineView.Children.Clear(); this.AddOutlineView(); } // Clear out the error condition ErrorItem errorItem = this.context.Items.GetValue<ErrorItem>(); errorItem.Message = null; errorItem.Details = null; } }
private void UndoEngineServiceUndoUnitAdded(object sender, UndoUnitEventArgs e) { UndoMenu.IsEnabled = true; }