private void ExportGraph(object sender, ExecutedRoutedEventArgs e) { var dlg = new Microsoft.Win32.SaveFileDialog(); dlg.DefaultExt = ".xps"; dlg.Filter = "XPS documents (.xps)|*.xps"; if (dlg.ShowDialog() == true) { this.graph.SaveToFile(dlg.FileName); } }