Ejemplo n.º 1
0
        public void SetValue()
        {
            ConcreteDependencyObject cdo = new ConcreteDependencyObject();

            Assert.Throws <Exception> (delegate {
                cdo.SetValue(InputMethod.IsInputMethodEnabledProperty, true);
            }, "SetValue");

            TextBox tb = new TextBox();

            tb.SetValue(InputMethod.IsInputMethodEnabledProperty, false);
            Assert.IsFalse(InputMethod.GetIsInputMethodEnabled(tb), "TextBox");

            MyTextBox mtb = new MyTextBox();

            mtb.SetValue(InputMethod.IsInputMethodEnabledProperty, false);
            Assert.IsFalse(InputMethod.GetIsInputMethodEnabled(mtb), "MyTextBox");
        }
Ejemplo n.º 2
0
		public void SetValue ()
		{
			ConcreteDependencyObject cdo = new ConcreteDependencyObject ();
			Assert.Throws<Exception> (delegate {
				cdo.SetValue (InputMethod.IsInputMethodEnabledProperty, true);
			}, "SetValue");

			TextBox tb = new TextBox ();
			tb.SetValue (InputMethod.IsInputMethodEnabledProperty, false);
			Assert.IsFalse (InputMethod.GetIsInputMethodEnabled (tb), "TextBox");

			MyTextBox mtb = new MyTextBox ();
			mtb.SetValue (InputMethod.IsInputMethodEnabledProperty, false);
			Assert.IsFalse (InputMethod.GetIsInputMethodEnabled (mtb), "MyTextBox");
		}