private void RestoreXML_Handler(object sender, RoutedEventArgs e) { using (StreamReader stream = new StreamReader(XmlSaveFilename)) { XmlSerializer serializer = new XmlSerializer(typeof(Yawn.Layout.DockDescriptor)); object layout = serializer.Deserialize(stream); MyDock.Clear(); Yawn.Layout.Restore(layout, MyDock, MyContentCreator); } }
private void Restore_Handler(object sender, RoutedEventArgs e) { using (FileStream stream = new FileStream(BinarySaveFilename, FileMode.Open)) { BinaryFormatter formatter = new BinaryFormatter(); object layout = formatter.Deserialize(stream); MyDock.Clear(); Yawn.Layout.Restore(layout, MyDock, MyContentCreator); } }
private void Clear_Handler(object sender, RoutedEventArgs e) { MyDock.Clear(); }