public TagDialog(TagViewModel tag)
 {
     InitializeComponent();
     tag.WindowCloseRequest += () => this.Close();
     this.DataContext = tag;
     this.Closing += (sender, args) => tag.OnClosing(args);
 }