Event Handler Support for the PowerShell Windows Form Designer
The PowerShell Pro Tools form designer now supports generating event handler code. You can click the event tab on the properties grid to view events that are available for the currently selected control.
Event handlers that are already connected to script blocks will show the variable name in the text field. To generate a new event handler, type the name of the variable you’d like to use and hit enter. Once you save the form with Ctrl+s or by clicking the Save button in the toolbar, the event handler will be generated in the code.