private void ClearDBClick(object sender, RoutedEventArgs e)
        {
            var clearPopup = new ClearPopup();

            clearPopup.Closed += (sender1, e1) =>
            {
                if (clearPopup.DialogResult == true)
                {
                    RefreshContact();
                }
                CheckButtons();
            };
            clearPopup.Show();
        }
 private void ClearDBClick(object sender, RoutedEventArgs e)
 {
     var clearPopup = new ClearPopup();
     clearPopup.Closed += (sender1, e1) =>
          {
              if (clearPopup.DialogResult == true)
                  RefreshContact();
              CheckButtons();
          };
     clearPopup.Show();
 }