Exemple #1
0
		public void ChildNameScope ()
		{
			Border b = new Border ();
			Canvas c = (Canvas)XamlReader.Load (@"
<Canvas xmlns=""http://schemas.microsoft.com/client/2007"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
  <Border>
    <Path x:Name=""foo"" Data=""F1 M 10,10 20,20 10,20"" Stroke=""Red""/>
  </Border>
</Canvas>");
			Assert.IsNotNull (c.FindName ("foo"),"c before");
			
			b.Child = c;
			
			Assert.IsNull (b.FindName ("foo"),"b after");
			Assert.IsNotNull (c.FindName ("foo"),"c after");
		}