/// <summary>
        /// Constructs a new remote control window
        /// </summary>
        /// <param name="sourceDevice">source device object</param>
        public RemoteControlWindow(SourceDevice sourceDevice)
        {
            RemoteReleaseControl control = sourceDevice.EnterReleaseControl();

            this.ViewModel   = new RemoteControlViewModel(sourceDevice, control);
            this.DataContext = this.ViewModel;

            this.InitializeComponent();
        }
        private void _comboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            RemoteControlViewModel dataContext = base.DataContext as RemoteControlViewModel;

            if (dataContext == null)
            {
                return;
            }
            if (dataContext.SetSourceCommand.CanExecute(null))
            {
                dataContext.SetSourceCommand.Execute(this._comboBox.SelectedItem);
            }
        }