public static InkWriterDocument Load(string filePath) { using (TextReader reader = new StreamReader(filePath)) { XmlSerializer serializer = new XmlSerializer(typeof(InkWriterDocument)); InkWriterDocument loadedDocument = (InkWriterDocument)serializer.Deserialize(reader); loadedDocument.FilePath = filePath; foreach (Page page in loadedDocument.Pages) { page.PageModified += loadedDocument.OnPageModified; } loadedDocument.IsDirty = false; return(loadedDocument); } }
public Page(InkWriterDocument document) { this.PageModified += document.OnPageModified; }