Solved

c# WPF vs. Winform

Posted on 2016-08-12
8
57 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
ID: 41754024
In WPF you should have TextChanged and LostFocus.
0
 

Author Comment

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

Expert Comment

by:Dustin Saunders
ID: 41754065
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
ID: 41754069
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 12

Expert Comment

by:Dustin Saunders
ID: 41754094
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
ID: 41756722
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
ID: 41756734
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
ID: 41759832
Thank you, this is my first time of use WPF and this article is very simple and helpful.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 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

11 Experts available now in Live!

Get 1:1 Help Now