/// <summary> /// sideBarControl_SelectedIndexChanged event handler. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">An EventArgs that contains the event data.</param> private void sideBarControl_SelectedIndexChanged(object sender, EventArgs e) { // Make the selected PreferencesPanel visible. if (sideBarControl.SelectedIndex < preferencesPanelList.Count && preferencesPanelList[sideBarControl.SelectedIndex] != null) { PreferencesPanel preferencesPanel = (PreferencesPanel)preferencesPanelList[sideBarControl.SelectedIndex]; if (BidiHelper.IsRightToLeft && preferencesPanel.RightToLeft != RightToLeft.Yes) { preferencesPanel.RightToLeft = RightToLeft.Yes; } BidiHelper.RtlLayoutFixup(preferencesPanel); panelPreferences.Controls.Add(preferencesPanel); if (ShowKeyboardCues) { //fix bug 406441, if the show cues window messages have been sent to the form //resend them to force the new control to show them ControlHelper.HideAccelerators(this); ControlHelper.ShowAccelerators(this); } if (ShowFocusCues) { //fix bug 406420, if the show cues window messages have been sent to the form //resend them to force the new control to show them ControlHelper.HideFocus(this); ControlHelper.ShowFocus(this); } preferencesPanel.BringToFront(); } // Remove unselected panels. RemoveUnselectedPanels(); }