In this section, we will continue from the previous section and we will few examples around UI side. Let us suppose the below snippet, where in i have simply created one windows form and attached a textbox to it.
Now, with the above change in place, it will simply give me one windows form with one text-box in it.
Now, here I would like to listen to text changed event. So, what i would do? I will simply go ahead and attach text changed handler as shown below in the snippet. Therefore, it has created the below sample event code.
But, here also if you look below screenshot, textchanged is not available.
Hence, this won’t be helpful for me. Rather than that, I would prefer to have reactive extension and subscribe the same as shown below.
Here, in order to get changed text, I need to make use of LINQ on the top of Rx. Hence, below is the finished code for the same. I have done little bit of refactoring as well, just to keep the code more readable and clean.
Hence, with the above change in place, when I run the app, it will produce me the below output.
You can also download the source code from here https://github.com/rahulsahay19/RxSample
With this I would like to wrap this session here. Thanks for joining me.
1,624 total views, 1 views today