예제 #1
0
		public void Layout ()
		{
			TextBlock tall_text = new TextBlock ();
			tall_text.Text = "1" + Environment.NewLine + "2";

			CheckBox check_box = new CheckBox ();
			check_box.Content = tall_text;

			check_box.Measure (new Size (double.PositiveInfinity, double.PositiveInfinity));

			UIElement bullet = (UIElement)VisualTreeHelper.GetChild (check_box, 0);

			Point location = bullet.TranslatePoint (new Point (0, 0), check_box);

			Assert.AreEqual (location.X, 0, "Bullet X");
			Assert.AreEqual (location.Y, 0, "Bullet Y");
		}