void tabControl1_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (!(e.Source is TabItem)) { return; } if(tabControl1.SelectedItem.Equals(tabItem1)) { this.tabItem1.Focus(); UpdateLayout(); //tabControl1.UpdateLayout(); this.textBox1.Focus(); } else { this.tabItem2.Focus(); this.tabItem2.UpdateLayout(); this.txtFocusTab2.Focus(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)