Is any control available that displays the line number in the text box on the left or right? If not, how to approach to create such a control?
Apparently, you are not the first to come across such a question.
So here are some links that might help you:
WPF RichTextBox for creating an editor with line numbers
http://www.aqistar.com/