private void OnShowingOpenDialog(object sender, DevExpress.Xpf.Diagram.DiagramShowingOpenDialogEventArgs e)
        {
            var viewModel = SelectDiagramViewModel.Create();
            var result    = openDialogService.ShowDialog(MessageButton.OKCancel, "Choose a diagram to open", viewModel);

            if (result == MessageResult.OK)
            {
                e.DocumentSourceToOpen = viewModel.SelectedName;
            }
            else
            {
                e.Cancel = true;
            }
        }
        private void OnShowingSaveDialog(object sender, DevExpress.Xpf.Diagram.DiagramShowingSaveDialogEventArgs e)
        {
            var viewModel = SelectDiagramViewModel.Create();

            viewModel.SelectedName = (string)diagram.DocumentSource;
            var result = saveDialogService.ShowDialog(MessageButton.OKCancel, "Choose a save location", viewModel);

            if (result == MessageResult.OK)
            {
                e.DocumentSourceToSave = viewModel.SelectedName;
            }
            else
            {
                e.Cancel = true;
            }
        }