src/Microsoft.VisualStudio.Editor.UnitTests/PropertyPages/Mocks/FakePropertyPageHosting/FakePropertyPageHosting_Base.cs
/// <summary>
/// Sets a control's text on the property page, making sure that the normal
///   events get fired (or at least that the page thinks they get fired), to
///   mimic a user's having typed in text and committed it.
/// </summary>
/// <param name="textbox"></param>
/// <param name="value"></param>
Sets a control's text on the property page, making sure that the normal
events get fired (or at least that the page thinks they get fired), to
mimic a user's having typed in text and committed it.
Sets a control ' s text on the property page making sure that the normal events get fired ( or at least that the page thinks they get fired ) to mimic a user ' s having typed in text and committed it .
public void Fake_TypeTextIntoControl(TextBox textbox, string value, bool doNotCommit)
        {
            textbox.Text = value; 
            if (!doNotCommit)
            {
                Fake_FireControlEvent(textbox, "LostFocus", EventArgs.Empty);
            }
        }
public void Fake_TypeTextIntoControl ( TextBox textbox , string value , bool doNotCommit ) { textbox . Text = value ; if ( ! doNotCommit ) { Fake_FireControlEvent ( textbox , " " , EventArgs . Empty ) ; } }
Sets a control's text on the property page, making sure that the normal
events get fired (or at least that the page thinks they get fired), to
mimic a user's having typed in text and committed it.
Sets a control ' s text on the property page making sure that the normal events get fired ( or at least that the page thinks they get fired ) to mimic a user ' s having typed in text and committed it .
// This will fire TextChanged // To make the control commit, we need to fire LostFocus (we can't do this //   directly because you can't set focus to non-visible controls.
textbox
TextBox
None
value
string
None
doNotCommit
bool