Example #1
0
 public void SetProtocol(string protocol)
 {
     try
     {
         if (ProtocolItems.Items.Count == 0)
         {
             var be = ProtocolItems.GetBindingExpression(ItemsControl.ItemsSourceProperty);
             be?.UpdateTarget();
             ProtocolItems.DataContext = DataContext;
         }
         ProtocolItems.SelectedItem = protocol;
     }
     catch (Exception e)
     {
         Dev2Logger.Warn(e.Message, "Warewolf Warn");
     }
 }
 public void SetProtocol(string protocol)
 {
     try
     {
         if (ProtocolItems.Items.Count == 0)
         {
             BindingExpression be = ProtocolItems.GetBindingExpression(ItemsControl.ItemsSourceProperty);
             be?.UpdateTarget();
             ProtocolItems.DataContext = DataContext;
         }
         ProtocolItems.SelectedItem = protocol;
     }
     // ReSharper disable once EmptyGeneralCatchClause
     catch
     {
     }
 }