I do agree that this feature is useful even for plain text editor. However, it is not easy to do with my current approach (implementation related). I will revisit this later. What I can do next is to provide "Go to line" feature, but not line number in the near future.
Adding line number to the RichEditBox is a problem, it seems can not set a fixed line height, but you can use TextRange.GetPoint() to get the position of a line.
This is my old editor, and it also uses RichEditBox,
it supports line number && code highlight
https://github.com/Duronsoft/Just_Editor_UWP_Old
You can also check this new one, it uses my custom input controls
https://github.com/Duronsoft/Just_Editor_UWP
@Duronsoft thx for the tip, I was trying the similar way but ends up with misaligned line number and line content. It starts to getting off a little bit after few thousand lines so I completely gave up.
@JasonStein

I found a new solution to get line height, it needs Direct2D API, I guess win2d also provides something similar, maybe you could try that.
Any news? line numbers would be awesome
@beerisgood I guess the best solution is to create a custom control, it means a lot of changes to this app, but it could get better performance.
鍚屽織锛屾湁鍏充簬琛屽彿鏄剧ず鐨勮繘灞曞浣曪紵
鍚屽織锛屾湁鍏充簬琛屽彿鏄剧ず鐨勮繘灞曞浣曪紵

WIP:

This feature has been implemented in Notepads v1.3.0.0.
Closing this thread for now.
Most helpful comment
WIP:
