Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
500
Wnt to WPF XamSyntaxtEditor on WinForm
posted

On WinForm I have added WPF control (Infragistic's XamSyntaxEditor)

I have added ElementHost on my Form .(Need to add reference to System.Windows.Forms.Integration)
In my Form Load after Initialise component.
I have writtn below code :

Dim Document As TextDocument = New TextDocument()
Document.Language = New Infragistics.Documents.VisualBasicLanguage
' WPF control which I want to add on Form
Dim editor As XamSyntaxEditor = New XamSyntaxEditor()
editor.ErrorDisplayMode = SyntaxErrorDisplayMode.Never
editor.SplitOptions = EditorDocumentViewSplitOptions.SplittingNotAllowed
editor.Document = Document
host.Dock = DockStyle.Fill
host.Child = editor
Control is getting added on  ,works fine .
But I am not able to trap any input /change evnt on this control.
How to communicate with Control .
I tried to hook event mentioned as below link :

http://stackoverflow.com/questions/4350862/wpf-events-in-winforms

But I am not sure how to write or hook custom event with WPF control events .