-
Mar 25th, 2013, 10:27 AM
#1
Thread Starter
Junior Member
Passing data from a textbox on wpf control (element host) to a Winform form
Hey Everyone
I have a VB.net project (.Net framework 4.0), with a number of forms. One of the the forms is called (AddModel.vb) where a user of this application can add a model file (e.g. MD5, OBJ, 3DS). On this form there is a Element host that is used to display a WPF Control called (SpellCheckTextbox.xaml). The WPF Control only contains a rich textbox with the ability to spell check the contents of itself. I want to be able to pass the contents of the WPF Rich textbox to a String in either the AddModel.vb form or a module, so that when I click the "Ok" button on my AddModel form, the text is added to a record in my database. However everything I've tried to get the wpf Rich textbox contents and pass it to a public string somewhere else in my application as failed.
Thank you for reading
-
Mar 25th, 2013, 01:40 PM
#2
Thread Starter
Junior Member
Re: Passing data from a textbox on wpf control (element host) to a Winform form
-
Mar 26th, 2013, 01:20 PM
#3
Thread Starter
Junior Member
Re: Passing data from a textbox on wpf control (element host) to a Winform form
Really starting to dislike WPF
-
Mar 27th, 2013, 04:05 AM
#4
Re: Passing data from a textbox on wpf control (element host) to a Winform form
How are you passing the contents of the Richtextbox to a string?
-
Mar 27th, 2013, 06:57 AM
#5
Thread Starter
Junior Member
Re: Passing data from a textbox on wpf control (element host) to a Winform form
That's exactly the problem. My application doesn't even see the control, I can't access the richtextbox from a module, class or Winform. I thought about setting a piece of code inside of the textchanged event that is use for spell checking.
Code:
Pseudo MyModule.Text = richtextbox.contents + richtextbox.contents
This doesn't work though
-
Mar 28th, 2013, 02:49 AM
#6
Re: Passing data from a textbox on wpf control (element host) to a Winform form
Did it raise any error when you tried using the textchanged event?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|