예제 #1
0
 /// <summary>
 /// Select vertex by setting its tag and highlight value
 /// </summary>
 /// <param name="vc">VertexControl object</param>
 private void SelectVertex(DependencyObject vc)
 {
     if (DragBehaviour.GetIsTagged(vc))
     {
         HighlightBehaviour.SetHighlighted(vc, false);
         DragBehaviour.SetIsTagged(vc, false);
         vc.ClearValue(DragBehaviour.XSnapModifierProperty);
         vc.ClearValue(DragBehaviour.YSnapModifierProperty);
     }
     else
     {
         HighlightBehaviour.SetHighlighted(vc, true);
         DragBehaviour.SetIsTagged(vc, true);
         DragBehaviour.SetXSnapModifier(vc, ExaggeratedSnappingXModifier);
         DragBehaviour.SetYSnapModifier(vc, ExaggeratedSnappingYModifier);
     }
 }