In my code below, I am trying to simulate the Click event for my button Browse
.
private void TextBox_MouseDown(object sender, RoutedEventArgs e)
{
this.Browse.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
}
This is the error that I am getting:
'System.Windows.Forms.ButtonBase' does not contain a definition for 'ClickEvent'
How can I raise the click event?
It appears there are some who are questioning the purpose of this code. I got it here https://stackoverflow.com/a/733974/1477388 and am simply trying to make it work.