views:

722

answers:

4

I was looking for a rich text editor with support for export/import to Html. All the available controls I found are Silverlight controls.

Someone asked in StackOverflow about WPF text editor, and the selected answer was:

A possible place to start, given the overlap between WPF and Silverlight is the Silverlight Rich Text Editor.

As far as I know, it is not possible to use Silverlight controls inside WPF application. Using browser control to host the Silverlight control seem to me like a really bad option.

Is it possible to use Silverlight in WPF application? Otherwise, is there any descent WPF rich text editor out there?

+2  A: 

I think the poster on the Stackoverflow question was suggesting recompiling the source to target WPF. This might imply fixing up / replacing certain bits of code, but having the source to a SL control makes it conceivable to port it to WPF.

HTH, Kent

Kent Boogaart
Agreed with this.
Jeff Wilcox
A: 

No, it is not possible to use Silverlight in a WPF application. They are very different technologies.

As for a "decent" rich text editor, there are plenty of decent ones (the RichTextBox that is built into WPF is more than decent). It sounds like what you really need is a rich text editor that has HTML support. If import/export of HTML is all you need, then it sounds like something you could easily add by inheriting from RichTextBox and adding some functionality.

Charlie
To be more specific, I need to give the user all the basic text editing capabilities, such as: select font, adding bullets, copy-paste while maintaining the formatting as-is, and so on.WPF's RichTextBox, for example doesn't support most of these features
Elad
And by the way, adding support for Html is far from easy. Even Microsoft's Xaml to Html converter fails to handle many simple cases.http://msdn.microsoft.com/en-us/library/aa972129.aspx
Elad
Well that's quite a bit of functionality but none of it is rocket science. Check out this article: http://michaelsync.net/2009/06/09/bindable-wpf-richtext-editor-with-xamlhtml-convertor
Charlie
A: 

Here's a WPF text editor component if you can't get the Silverlight one to work:

WPF Text Editor

Jon Galloway
A: 

hello in the silverlight we have persian datepicker .can i use it in wpf because wpf doesnt dave persian datepicker .

bahar