tags:

views:

45

answers:

0

Hi! I should make a XML editor on WPF with auto closing tags and highlight tags attributes and data. Now I use PreviewKeyDown event to check which key is pressed. For example when I press < the variable TagStart is set to true and everything typed after < is stored in StringBuilder variable and when > is pressed it generates a close tag. Now I'm reading for a MVVM Pattern and I want to use it but don't know how to. What the model or viewmodel should be? And can I use my idea with the MVVM or I should change the code?

Also how can I make a Line Numbering. My idea is to listen for key down ( for Enter and backspace )