Interaction logic for Search.xaml
 private async void SearchButton(object sender, RoutedEventArgs e)
 {
     modelHelpers.HideFlyout(this);
     var searchFlyout = new Search(modelHelpers, openFromAdd: true);
     await modelHelpers.OpenFlyout(searchFlyout);
     if (searchFlyout.SelectedJira != null)
     {
         DataModel.SetJiraReference(searchFlyout.SelectedJira.Reference);
     }
     modelHelpers.OpenFlyout(this);
 }
 private void SearchButton(object sender, RoutedEventArgs e)
 {
     var searchFlyout = new Search(viewModel, true);
     
     searchFlyout.IsOpenChanged += (o, args) =>
     {
         if (!searchFlyout.IsOpen)
         {
             if (searchFlyout.SelectedJira != null)
             {
                 DataModel.SetJiraReference(searchFlyout.SelectedJira.Reference);
             }
         }
     };
     
     viewModel.MainWindow.OpenFlyout(searchFlyout);
     
 }