Example #1
0
		public void SetMediaElement ()
		{
			MediaElement media = new MediaElement ();
			VideoBrush brush = new VideoBrush ();
			object retval;
			
			brush.SourceName = "iTube";
			
			media.Name = "YouTube";
			brush.SetSource (media);
			
			Assert.AreEqual (String.Empty, brush.SourceName, "SourceName after SetSource");
			
			// since String.Empty is the default value, we also have to check RLV
			retval = brush.ReadLocalValue (VideoBrush.SourceNameProperty);
			Assert.AreNotEqual (DependencyProperty.UnsetValue, retval, "SourceName is not cleared after SetSource");
		}