In C# Winform application, in order to add a spell checker to a textbox, i added usercontrolWPF.textbox but did not find "Leave" and 'TextChanged" events there, what should I do in case if I need it?
C#.NET Programming
Last Comment
ybt
8/22/2022 - Mon
Dustin Saunders
In WPF you should have TextChanged and LostFocus.
ybt
ASKER
In attached file the only list of events I found there
Dustin Saunders
That looks like the events for an elementHost or a userControl; not the events for a textBox. How did you add the textBox to the form?
The only way I found to add a WPF textbox is to create a usercontrol with textbox inside and place user control in my winform. Is there any other way?
Dustin Saunders
I see, so it's a WPF control in a winform app (not a wpf app). So when you add the control to your project, you can edit the event fields in the control directly.
It's a bit of a read, but this article goes in depth on controls in hybrid applications.
ybt
ASKER
This article is interesting, but it is still unclear how can I access a textbox event from a window that holds a user control that contains a textbox