コード例 #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");
        }
コード例 #2
0
ファイル: InputMethodTest.cs プロジェクト: dfr0/moon
		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");
		}