protected override DependencyObject ElementLoadingOverride(string serializationTag) { var element = base.ElementLoadingOverride(serializationTag); if (serializationTag == "Document" && element == null) { element = FileServicesModule.CreateDocument("New Document") as DependencyObject; } return(element); }
public void OnCreateDocument(string documentHeader) { var document = FileServicesModule.CreateDocument(documentHeader); this.AddDocument(document); }