Rewrite of the editor in WPF C#