1 //----------------------------------------------------------------
2 // <copyright company="Microsoft Corporation">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 //----------------------------------------------------------------
7 namespace System.Activities.Presentation.FreeFormEditing
10 using System.Windows.Controls;
11 using System.Windows.Input;
12 using System.Windows.Media;
14 internal partial class ConnectorWithStartDot : Connector
16 public ConnectorWithStartDot()
18 this.InitializeComponent();
21 public override FrameworkElement StartDot
25 return this.startDotGrid;
29 public override void SetLabelToolTip(object toolTip)
31 this.labelTextBlock.ToolTip = toolTip;
34 protected override void OnDragEnter(DragEventArgs e)
36 if (!this.IsMouseOnStartDot(e))
42 protected override void OnMouseEnter(MouseEventArgs e)
44 System.Windows.Controls.Panel.SetZIndex(this, 999);
48 protected override void OnMouseLeave(MouseEventArgs e)
50 System.Windows.Controls.Panel.SetZIndex(this, 1);
54 private bool IsMouseOnStartDot(DragEventArgs e)
56 HitTestResult result = VisualTreeHelper.HitTest(this, e.GetPosition(this));
57 if (result != null && this.startDotGrid.IsAncestorOf(result.VisualHit))