/// <summary> /// Handles the DropDownClosed event of the txtbxSymbolNew control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="bool"/> instance containing the event data.</param> private void TxtbxSymbolNewDropDownClosed(object sender, RoutedPropertyChangedEventArgs <bool> e) { var symbol = ((AutoCompleteBox)sender).Text.ToUpper(); if ((bool)_vm.CheckForExistingStockBySymbolName(symbol)) { ((AutoCompleteBox)sender).Text = ""; if (_vm.AddStockCommand.CanExecute(symbol)) { _vm.AddStockCommand.Execute(symbol); } } }