private void NewButton_Click(object sender, RoutedEventArgs e)
 {
     Button btn = sender as Button;
     NewRelationWindow newRelaWin = new NewRelationWindow(this.AddNewSuccess);
     App.MainFrameWindow.MainFrame.Children.Add(newRelaWin);
     newRelaWin.IsModal = true;
     newRelaWin.Show();
     newRelaWin.BringToFront();
 }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     Button btn = sender as Button;
     List<int> instrumentIds = this._ItemSource.SingleOrDefault(i => i.Id == (Guid)btn.Tag).InstrumentIds;
     NewRelationWindow newRelaWin = new NewRelationWindow(instrumentIds,btn.Content.ToString(), this.EditSuccess);
     App.MainFrameWindow.MainFrame.Children.Add(newRelaWin);
     newRelaWin.IsModal = true;
     newRelaWin.Show();
     newRelaWin.BringToFront();
 }