Solved

c# WPF vs. Winform

Posted on 2016-08-12
8
77 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

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
 
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 70

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to repeat the data 4 30
Need help converting bitmap to image in VB.Net 8 45
TFS 2015 Access denied. 1 30
Asp.Net Session Question 2 36
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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