Exemplo n.º 1
0
        protected override void OnMouseMove(MouseEventArgs e)
        {
            Point pt = e.GetPosition(this);

            HitTestResult result = VisualTreeHelper.HitTest(this, pt);

            if (result == null)
            {
                ToolTipController.Move(null, null);
            }
            else
            {
                DrawingVisual hit = result.VisualHit as DrawingVisual;
                object        tag = (hit != null) ? hit.ReadLocalValue(FrameworkElement.TagProperty) : null;
                ToolTipController.Move(ToolTipContentProvider, tag);
            }
        }
Exemplo n.º 2
0
 protected override void OnMouseLeave(MouseEventArgs e)
 {
     base.OnMouseLeave(e);
     ToolTipController.Move(null, null);
 }