CodeEditorContol-WinUI icon indicating copy to clipboard operation
CodeEditorContol-WinUI copied to clipboard

Awesome project but a question

Open NeomMob opened this issue 3 years ago • 1 comments

Awesome control. It fills the gap for a modern WinUI code editor. Why did you choose to do your own instead of porting https://github.com/icsharpcode/AvalonEdit which has a good foundation for text editing?

NeomMob avatar Feb 02 '22 11:02 NeomMob

Thanks, but at the current state, I wouldn't call it awesome, mainly because of the catastrophic state of the code structure and the missing (working) text wrapping feature...

I am well aware of AvalonEdit but the problem is that:

  • I am a total noob and programming is only a hobby for me
  • I got quite overwhelmed by the amount of WPF API usage (specifically IScrollInfo and IWeakEventListener)
  • After hours of digging I didn't understand where the text is actually printed on the screen, which I found just now, it seems to be this line
  • The text rendering and editing logic are saparated and deeply nested within a never ending amount of .cs files, which again was quite overwhelming to start with

I really tried but got very frustrated so I stopped trying to port other WPF based solutions and tried it on my own with WinUI and Win2D. Right now it's a just-for-fun project, the code of which might be streamlined to adopt the rendereing and editing logic of AvalonEdit in the future (once I finally understand how AvalonEdit works...). This process is of course very inefficient and I am silently hoping that somebody will do an actual port of AvalonEdit in the future :)

WelterDevelopment avatar Feb 02 '22 12:02 WelterDevelopment