public GraphDialog(Action<Graph> callback, DialogMode dialogMode, Graph graph = null)
        {
            this.InitializeComponent();

            _callback = callback;

            switch (dialogMode)
            {
                case DialogMode.CreationMode:

                    _graph = new Graph() { CreationDate = DateTime.Now, LastOpenTime = DateTime.Now, Links = new BindableCollection<Link>(), Nodes = new BindableCollection<Node>() };

                    Title = "New graph";
                    PrimaryButtonText = "Create";

                    break;
                case DialogMode.EditMode:

                    _graph = graph;

                    Title = "Edit graph";
                    PrimaryButtonText = "Save";

                    break;
                default:
                    throw new ArgumentException("Not supported", "dialogMode");
            }
        }
        public void GraphSelected(Graph graph)
        {
            if (IsInSelectMode)
            {
                return;
            }

            _navigationService.For<GraphViewModel>().WithParam(vm => vm.GraphId, graph.GraphId).Navigate();
        }