开发者

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

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

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

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

Thanks.


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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜