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"); }
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"); }