private void ChangeHostControl(IDiscreteLightControl newControl) { if (null != _control) { _control.SelectedValueChanged -= EhSelectedValueChanged; } _control = newControl; _guiControlHost.Child = (UIElement)_control; if (null != _control) { _control.SelectedValueChanged += EhSelectedValueChanged; } }
private void ChangeHostControl(IDiscreteLightControl newControl) { if (null != _control) _control.SelectedValueChanged -= EhSelectedValueChanged; _control = newControl; _guiControlHost.Child = (UIElement)_control; if (null != _control) _control.SelectedValueChanged += EhSelectedValueChanged; }