Esempio n. 1
0
        public void DataBinding_BindToNonBooleanMember()
        {
            ThreadRunner.RunInSTA(delegate
            {
                //Create the visual
                BoolToVisibilityConverterTestVisual testVisual = new BoolToVisibilityConverterTestVisual();

                //Create the object that the visual will databind to.
                BoolToVisibilityConverterBindableNonBoolClass dataContext = new BoolToVisibilityConverterBindableNonBoolClass();
                dataContext.IsVisible1 = "some string 1";
                dataContext.IsVisible2 = "some string 2";
                testVisual.DataContext = dataContext;

                //Render the visual
                RenderUtility.RenderVisual(testVisual);
            });
        }
		public void DataBinding_BindToNonBooleanMember()
		{
			ThreadRunner.RunInSTA(delegate
			{

				//Create the visual
				BoolToVisibilityConverterTestVisual testVisual = new BoolToVisibilityConverterTestVisual();

				//Create the object that the visual will databind to.
				BoolToVisibilityConverterBindableNonBoolClass dataContext = new BoolToVisibilityConverterBindableNonBoolClass();
				dataContext.IsVisible1 = "some string 1";
				dataContext.IsVisible2 = "some string 2";
				testVisual.DataContext = dataContext;

				//Render the visual
				RenderUtility.RenderVisual(testVisual);
			});
		}