Interaction logic for Search.xaml
コード例 #1
0
 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);
 }
コード例 #2
0
 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);
     
 }