1

Does anyone know if there's a free WPF syntax highlighting component? I'm currently using AvalonEdit, which is part of the new SharDevelop source.
The trouble I'm having is that it doesn't appear to support binding for the text content.

Does anyone know if this is possible or if there's any other similar controls that do support data binding?

Steve Dunn
  • 21,044
  • 11
  • 62
  • 87
  • duplicate of this post : http://stackoverflow.com/questions/394751/anyone-know-a-code-editor-i-can-embed-in-a-wpf-window-or-windows-forms – Thomas Levesque Jun 17 '09 at 09:26
  • also a duplicate of http://stackoverflow.com/questions/454872/syntax-highlighter-for-wpf and http://stackoverflow.com/questions/553492/syntax-highlighting-textbox-for-winforms-asp-net-wpf – Helen Jun 17 '09 at 09:50
  • Hi, I looked at those before posting, but part of my question (perhaps not very clearly) asks if anyone knows how to data-bind the text to the AvalonEdit control. – Steve Dunn Jun 17 '09 at 14:23

1 Answers1

1

AFAIK it's impossible to efficiently implement data binding in custom WPF text box controls.

The builtin WPF TextBox can only do this by using System.Windows.DeferredReference; but Microsoft left that class internal.

You'll have to manually copy values in and out of AvalonEdit.

Daniel
  • 15,944
  • 2
  • 54
  • 60