user593358
user593358

Reputation:

WPF: Text editor control that can rearrange paragraphs by drag & drop (like OneNote)

I want to embed a OneNote alike text editor into my program, so that I can easily rearrange paragraphs by drag & drop.

enter image description here

Any (open source) text editor control that can do this?

Thanks.

Upvotes: 6

Views: 944

Answers (1)

Anvaka
Anvaka

Reputation: 15823

Captain Obvious here. Text editing support in WPF is really poor, to say the least. Especially when you try to do something more sophisticated then showing few lines of plain text.

WPF's RichTextBox is piece of cr@p. But still it can be extended to achive what you want. All you need to do is create a mouse events listner, and every time you feel like it's time to show this little icon - show it in adorner layer over the editor. This post has good examples how to do it: Richtextbox Resizing Adorner

If you need an open source WPF text editor I would be surprised if you could find anything better than AvalonEdit. Not only great architectural it has but it's totally pleasant and joyful reading. Even if it does not support your feature directly - it's open source, and adorner trick still applies.

PS: Sorry for being too emotional in this answer. I saw too many suffer to be calm when it comes to text editing in WPF blush

Upvotes: 3

Related Questions