void vertex_IsExpandedChanged(object sender, EventArgs e)
        {
            var vertex = (DataVertex)sender;

            if (vertex.IsExpanded || vertex.Properties == null || vertex.Properties.Count < 1 || !Area.VertexList.ContainsKey(vertex))
            {
                return;
            }

            var vc = Area.VertexList[vertex];

            if (tbtnCanDrag.IsChecked.HasValue && tbtnCanDrag.IsChecked.Value)
            {
                RunCodeInUiThread(() =>
                {
                    foreach (var edge in Area.GetRelatedControls(vc, GraphControlType.Edge, EdgesType.All))
                    {
                        var ec = (EdgeControl)edge;
                        var op = new DeleteEdgeOperation(Area, ec.Source.Vertex as DataVertex, ec.Target.Vertex as DataVertex, ec.Edge as DataEdge);
                        op.Do();
                        op.UnDo();
                    }

                    //    Area.GenerateAllEdges();
                    //    Area.ShowAllEdgesLabels();
                    //Area.ComputeEdgeRoutesByVertex(vc);
                    //Area.InvalidateVisual();
                    //////Area.UpdateAllEdges();
                    //Area.ComputeEdgeRoutesByVertex(vc);
                    //vc.InvalidateVisual();
                }, priority: DispatcherPriority.Loaded);
            }
        }
        void miDeleteLink_Click(object sender, RoutedEventArgs e)
        {
            var eCtrl = (sender as System.Windows.Controls.MenuItem).Tag as EdgeControl;

            if (eCtrl != null)
            {
                var edge = eCtrl.Edge as DataEdge;

                var op = new DeleteEdgeOperation(Area, edge.Source, edge.Target, edge, (ec) =>
                {
                    //do nothing
                },
                                                 (ec) =>
                {
                    //do nothing
                });

                _viewmodel.Do(op);
            }
            //throw new NotImplementedException();
        }