void OnHostedDocumentChanged(object sender, UndoableEditEventArgs e) { if (Document == null) { return; } if (RootView == null) { e = new UndoableEditEventArgs(new RebuildDocumentEditInfo(Document), e.UndoOrRedo); } OnDocumentChanged(e); UndoableEditCreated?.Invoke(this, e); }
void OnDocumentChanged(UndoableEditEventArgs e) { if (Document == null) { RootView = null; InvalidateLayout(); return; } if (RootView == null) { var d = Document; RootView = ViewFactory.CreateFor(d.Root, Style); } IterateTreeOnDocumentChange(e.Edit, RootView); InvalidateLayout(); }
protected void Raise(UndoableEditEventArgs args) { undoableEditCreatedSupport.Raise(this, args); }