示例#1
0
        private void Edge_Click(object sender, MouseButtonEventArgs e)
        {
            contextMenuEdge = ((FrameworkElement)sender).DataContext as Graphing.RootCauseEdge;
            var menu = FindResource("EdgeMenu") as ContextMenu;

            menu.Placement = System.Windows.Controls.Primitives.PlacementMode.MousePoint;
            menu.IsOpen    = true;
        }
示例#2
0
 private void RootCauseLayout_LeftMouseUp(object sender, MouseButtonEventArgs e)
 {
     if (RootCauseLayoutClick && RootCauseLayout.HighlightedEdges.Count() > 0)
     {
         contextMenuEdge = RootCauseLayout.HighlightedEdges.First();
         var menu = FindResource("EdgeMenu") as ContextMenu;
         menu.Placement = System.Windows.Controls.Primitives.PlacementMode.MousePoint;
         menu.IsOpen    = true;
     }
     RootCauseLayoutClick = false;
 }