Link to home
Start Free TrialLog in
Avatar of ybt
ybt

asked on

c# WPF vs. Winform

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?
Avatar of Dustin Saunders
Dustin Saunders
Flag of United States of America image

In WPF you should have TextChanged and LostFocus.
Avatar of ybt
ybt

ASKER

In attached file the only list of events I found thereUser generated image
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?
Avatar of ybt

ASKER

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?
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.
Avatar of 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
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ybt

ASKER

Thank you, this is my first time of use WPF and this article is very simple and helpful.