/// <summary> /// The focus can be set only after the animation has stopped playing. /// </summary> private void ExpandDetailsAddIntermediate_StoryboardCompleted(object sender, EventArgs e) { // Select the first parent set for quick entry. ParentsListBox.SelectedIndex = 0; IntermediateAddButton.Focus(); }
private void ParentsListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { // Make it easy to add new people to the tree by pressing return IntermediateAddButton.Focus(); }