Example #1
0
 private static void BackgroundHitTestTest(Border border, Visual hitTestResult)
 {
     Assert.AreEqual(hitTestResult, border.HitTest(new Point(border.BorderThickness.Left + 5, border.BorderThickness.Top + 5)));
     Assert.AreEqual(hitTestResult, border.HitTest(new Point(border.Width - border.BorderThickness.Right - 5, border.BorderThickness.Top + 5)));
     Assert.AreEqual(hitTestResult, border.HitTest(new Point(border.Width - border.BorderThickness.Right - 5, border.Height - border.BorderThickness.Bottom - 5)));
     Assert.AreEqual(hitTestResult, border.HitTest(new Point(border.BorderThickness.Left + 5, border.Height - border.BorderThickness.Bottom - 5)));
 }
Example #2
0
 private static void BorderHitTestTest(Border border, Visual hitTestResult)
 {
     Assert.AreEqual(hitTestResult, border.HitTest(new Point(border.BorderThickness.Left / 2, border.BorderThickness.Top / 2)));
     Assert.AreEqual(hitTestResult, border.HitTest(new Point(border.Width - border.BorderThickness.Right / 2, border.BorderThickness.Top / 2)));
     Assert.AreEqual(hitTestResult, border.HitTest(new Point(border.Width - border.BorderThickness.Right / 2, border.Height - border.BorderThickness.Bottom / 2)));
     Assert.AreEqual(hitTestResult, border.HitTest(new Point(border.BorderThickness.Left / 2, border.Height - border.BorderThickness.Bottom / 2)));
 }