private void ConsumerComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var streamConsumer = _consumerComboBox.SelectedItem as PluginStreamConsumer;

            var eventArgs = new ConsumerChangedEventArgs(_currentConsumer, streamConsumer, ConsumerConfigurationPanel.Context);

            ConsumerChanged?.Invoke(this, eventArgs);

            InitializeConsumerConfigurationPanel(streamConsumer);
            ConsumerConfigurationPanel.Context = eventArgs.NewConsumerParams ?? EmptyContext.Instance;
        }
        private void ConsumerComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var comboBox    = (ComboBox)sender;
            var viewModel   = (ConsumerConfigViewModel)comboBox.Tag;
            var consumer    = comboBox.SelectedItem as ConsumerTemplate;
            var oldConsumer = viewModel.Current;
            var oldContext  = viewModel.ParamPanel.Context;

            InitializeConsumerConfigurationPanel(viewModel, consumer);

            if (_consumerUpdateLock.IsReferred)
            {
                return;
            }
            var eventArgs = new ConsumerChangedEventArgs(_deviceType, oldConsumer, consumer, oldContext);

            ConsumerChanged?.Invoke(this, eventArgs);
            viewModel.ParamPanel.Context = eventArgs.NewConsumerArgs ?? EmptyContext.Instance;
        }