- If you haven't already done so, create a new Windows form application and call it winformRx. Open the form designer and in Toolbox, search for the TextBox control and add it to your form.
- Next, add a label control to your form.
- Double-click on your Windows form designer to create the onload event handler. Inside this handler, add some code to read the text entered into the textbox and only display that text 5 seconds after the user has stopped typing. This is achieved using the Throttle keyword. Add a subscription to the searchTerm variable, writing the result of the text input to the label control's text property:
private void Form1_Load(object sender, EventArgs e) { var searchTerm = Observable.FromEventPattern<EventArgs>( ...