Solved

c# WPF vs. Winform

Posted on 2016-08-12
8
53 Views
Last Modified: 2016-08-17
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?
0
Comment
Question by:ybt
  • 4
  • 3
8 Comments
 
LVL 12

Expert Comment

by:Dustin Saunders
Comment Utility
In WPF you should have TextChanged and LostFocus.
0
 

Author Comment

by:ybt
Comment Utility
In attached file the only list of events I found thereListEvens.jpg
0
 
LVL 12

Expert Comment

by:Dustin Saunders
Comment Utility
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?
0
 

Author Comment

by:ybt
Comment Utility
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?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 12

Expert Comment

by:Dustin Saunders
Comment Utility
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.
0
 

Author Comment

by:ybt
Comment Utility
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
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
Comment Utility
you will need to expose the behaviors and properties from WPF to your Windows Forms. I think this article is a bit better: http://www.developerfusion.com/community/blog-entry/8393574/wpfwinforms-interop-a-highlighted-textbox/
0
 

Author Closing Comment

by:ybt
Comment Utility
Thank you, this is my first time of use WPF and this article is very simple and helpful.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now