protected override bool OnHitTest(ref Vector2 mousePoint, out HitTest2DResult hitResult)
 {
     if (Content != null && LayoutBoundWithTransform.Contains(mousePoint))
     {
         return(Content.HitTest(mousePoint, out hitResult));
     }
     else
     {
         hitResult = null;
         return(false);
     }
 }
Exemple #2
0
 protected override bool OnHitTest(ref Vector2 mousePoint, out HitTest2DResult hitResult)
 {
     hitResult = null;
     if (LayoutBoundWithTransform.Contains(mousePoint))
     {
         hitResult = new HitTest2DResult(this);
         return(true);
     }
     else
     {
         return(false);
     }
 }
 protected override bool OnHitTest(ref Vector2 mousePoint, out HitTest2DResult hitResult)
 {
     hitResult = null;
     if (LayoutBoundWithTransform.Contains(mousePoint))
     {
         foreach (var item in Items.Reverse())
         {
             if (item.HitTest(mousePoint, out hitResult))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
 /// <summary>
 /// Called when [hit test].
 /// </summary>
 /// <param name="mousePoint">The mouse point.</param>
 /// <param name="hitResult">The hit result.</param>
 /// <returns></returns>
 protected override bool OnHitTest(ref Vector2 mousePoint, out HitTest2DResult hitResult)
 {
     hitResult = null;
     if (!EnableMover)
     {
         return(false);
     }
     if (LayoutBoundWithTransform.Contains(mousePoint))
     {
         foreach (var b in Buttons)
         {
             b.Visibility = System.Windows.Visibility.Visible;
         }
         return(base.OnHitTest(ref mousePoint, out hitResult));
     }
     else
     {
         foreach (var b in Buttons)
         {
             b.Visibility = System.Windows.Visibility.Hidden;
         }
         return(false);
     }
 }