示例#1
0
		public void GetValue ()
		{
			ConcreteDependencyObject cdo = new ConcreteDependencyObject ();
			Assert.Throws<Exception> (delegate {
				cdo.GetValue (InputMethod.IsInputMethodEnabledProperty);
			}, "GetValue");

			TextBox tb = new TextBox ();
			Assert.IsTrue ((bool) tb.GetValue (InputMethod.IsInputMethodEnabledProperty), "TextBox");

			MyTextBox mtb = new MyTextBox ();
			Assert.IsTrue ((bool) mtb.GetValue (InputMethod.IsInputMethodEnabledProperty), "MyTextBox");
		}
示例#2
0
        public void GetValue()
        {
            ConcreteDependencyObject cdo = new ConcreteDependencyObject();

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

            TextBox tb = new TextBox();

            Assert.IsTrue((bool)tb.GetValue(InputMethod.IsInputMethodEnabledProperty), "TextBox");

            MyTextBox mtb = new MyTextBox();

            Assert.IsTrue((bool)mtb.GetValue(InputMethod.IsInputMethodEnabledProperty), "MyTextBox");
        }