private void itemName_LostFocus(object sender, RoutedEventArgs e) { try { if (!AdditionalData.GetItemNames().Contains(itemName.Text) && itemName.Text.Length > 0 && itemName.Text != "None") { AdditionalData.AddItemName(itemName.Text); } } catch (Exception) { } OnNodeDataChanged(sender, e); }
private void itemName_GotFocus(object sender, RoutedEventArgs e) { itemName.ItemsSource = AdditionalData.GetItemNames(); }