31 writes to SelectedTab
System.Windows.Forms (4)
System\Windows\Forms\Controls\TabControl\TabControl.cs (3)
984SelectedTab = GetTabPage(++index); 988SelectedTab = GetTabPage(0); 1664SelectedTab = t;
System\Windows\Forms\Controls\TabControl\TabPage.TabAccessibleObject.cs (1)
85OwningTabControl.SelectedTab = _owningTabPage;
System.Windows.Forms.Design (4)
System\Drawing\Design\ColorEditor.ColorUI.cs (3)
173_tabControl.SelectedTab = _systemTabPage; 347_tabControl.SelectedTab = _tabControl.TabPages[sel]; 392_tabControl.SelectedTab = selectedTab;
System\Windows\Forms\Design\TabControlDesigner.cs (1)
422tabControl.SelectedTab = page;
System.Windows.Forms.Tests (23)
System\Windows\Forms\AccessibleObjects\TabPage.TabAccessibleObjectTests.cs (3)
710tabControl.SelectedTab = pages[1]; 731tabControl.SelectedTab = pages[1]; 753tabControl.SelectedTab = pages[0];
System\Windows\Forms\TabControl.ControlCollectionTests.cs (2)
1362owner.SelectedTab = value4; 1399owner.SelectedTab = value4;
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (2)
4466owner.SelectedTab = value4; 4505owner.SelectedTab = value4;
System\Windows\Forms\TabControlTests.cs (16)
2560SelectedTab = value 2567control.SelectedTab = value; 2584control.SelectedTab = page2; 2594control.SelectedTab = page2; 2604control.SelectedTab = page3; 2614control.SelectedTab = page1; 2624control.SelectedTab = null; 2647control.SelectedTab = value; 2656control.SelectedTab = value; 2697control.SelectedTab = page2; 2716control.SelectedTab = page2; 2735control.SelectedTab = page3; 2754control.SelectedTab = page1; 2773control.SelectedTab = null; 4282control.SelectedTab = page2; 4457control.SelectedTab = page2;
126 references to SelectedTab
System.Windows.Forms (28)
System\Windows\Forms\Controls\TabControl\TabControl.cs (19)
980if (SelectedTab == t) 1210NotifyAboutFocusState(SelectedTab, focused: true); 1213if (IsAccessibilityObjectCreated && SelectedTab is not null) 1215SelectedTab.TabAccessibilityObject.RaiseAutomationEvent(UIA_EVENT_ID.UIA_AutomationFocusChangedEventId); 1340SelectedTab?.FireEnter(e); 1359SelectedTab?.FireLeave(e); 1366NotifyAboutFocusState(SelectedTab, focused: false); 1451NotifyAboutFocusState(SelectedTab, focused: true); 1470SelectedTab?.FireEnter(EventArgs.Empty); 1489if (SelectedTab is not null) 1491NotifyAboutFocusState(SelectedTab, focused: false); 1492SelectedTab.FireLeave(EventArgs.Empty); 1950TabControlCancelEventArgs tcc = new(SelectedTab, SelectedIndex, false, TabControlAction.Selecting); 1954OnSelected(new TabControlEventArgs(SelectedTab, SelectedIndex, TabControlAction.Selected)); 1957if (IsAccessibilityObjectCreated && SelectedTab?.ParentInternal is TabControl) 1959SelectedTab.TabAccessibilityObject.RaiseAutomationEvent(UIA_EVENT_ID.UIA_SelectionItem_ElementSelectedEventId); 1960BeginInvoke((MethodInvoker)(() => SelectedTab.TabAccessibilityObject.RaiseAutomationEvent(UIA_EVENT_ID.UIA_AutomationFocusChangedEventId))); 1993TabControlCancelEventArgs tcc = new(SelectedTab, SelectedIndex, false, TabControlAction.Deselecting); 1997OnDeselected(new TabControlEventArgs(SelectedTab, SelectedIndex, TabControlAction.Deselected));
System\Windows\Forms\Controls\TabControl\TabControl.TabControlAccessibleObject.cs (6)
55? owner.SelectedTab?.AccessibilityObject 91if (owner.SelectedTab is not null 92&& owner.SelectedTab.AccessibilityObject.Bounds.Contains(point)) 94return owner.SelectedTab.AccessibilityObject; 120NavigateDirection.NavigateDirection_FirstChild => owner.SelectedTab?.AccessibilityObject, 140=> !this.IsOwnerHandleCreated(out TabControl? owner) || owner.SelectedTab is null
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
205TabPage? selectedTab = tabControl.SelectedTab;
System\Windows\Forms\Controls\TabControl\TabPage.TabAccessibleObject.cs (1)
63internal override bool IsItemSelected => OwningTabControl?.SelectedTab == _owningTabPage;
System\Windows\Forms\Controls\TabControl\TabPage.TabPageAccessibleObject.cs (1)
84if (!this.TryGetOwnerAs(out TabPage? owningTabPage) || OwningTabControl is null || owningTabPage != OwningTabControl.SelectedTab)
System.Windows.Forms.Design (7)
System\Drawing\Design\ColorEditor.ColorUI.ColorEditorTabControl.cs (1)
20TabPage? selectedTab = SelectedTab;
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
323TabPage? selectedPage = _tabControl.SelectedTab;
System\Windows\Forms\Design\TabControlDesigner.cs (5)
126if (tc.SelectedTab is null) 134TabPageDesigner selectedTabPageDesigner = host.GetDesigner(tc.SelectedTab) as TabPageDesigner; 334TabPage tp = tc.SelectedTab; 446if (page is not null && page.Parent == tabControl && page == tabControl.SelectedTab) 485TabPage selectedTab = ((TabControl)Component).SelectedTab;
System.Windows.Forms.Tests (91)
System\Windows\Forms\AccessibleObjects\TabControl.TabControlAccessibleObjectTests.cs (4)
293AccessibleObject expectedAccessibleObject = tabControl.SelectedTab.AccessibilityObject; 377Assert.Equal(tabControl.SelectedTab.AccessibilityObject, accessibleObject.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild)); 393Assert.Equal(tabControl.SelectedTab.AccessibilityObject, accessibleObject.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild)); 413Assert.Equal(tabControl.SelectedTab.AccessibilityObject, accessibleObject.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild));
System\Windows\Forms\TabControl.ControlCollectionTests.cs (10)
1363Assert.Same(value4, owner.SelectedTab); 1368Assert.Throws<ArgumentOutOfRangeException>(() => owner.SelectedTab); 1373Assert.Throws<ArgumentOutOfRangeException>(() => owner.SelectedTab); 1378Assert.Throws<ArgumentOutOfRangeException>(() => owner.SelectedTab); 1383Assert.Null(owner.SelectedTab); 1400Assert.Same(value4, owner.SelectedTab); 1406Assert.Same(value4, owner.SelectedTab); 1411Assert.Same(value1, owner.SelectedTab); 1416Assert.Same(value3, owner.SelectedTab); 1421Assert.Null(owner.SelectedTab);
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (10)
4467Assert.Same(value4, owner.SelectedTab); 4472Assert.Throws<ArgumentOutOfRangeException>(() => owner.SelectedTab); 4477Assert.Throws<ArgumentOutOfRangeException>(() => owner.SelectedTab); 4482Assert.Throws<ArgumentOutOfRangeException>(() => owner.SelectedTab); 4487Assert.Null(owner.SelectedTab); 4506Assert.Same(value4, owner.SelectedTab); 4512Assert.Same(value4, owner.SelectedTab); 4517Assert.Same(value1, owner.SelectedTab); 4522Assert.Same(value3, owner.SelectedTab); 4527Assert.Null(owner.SelectedTab);
System\Windows\Forms\TabControlTests.cs (67)
95Assert.Null(control.SelectedTab); 2058Assert.Equal(value < 0 || value >= control.TabPages.Count ? null : control.TabPages[value], control.SelectedTab); 2068Assert.Equal(value < 0 || value >= control.TabPages.Count ? null : control.TabPages[value], control.SelectedTab); 2094Assert.Null(control.SelectedTab); 2103Assert.Null(control.SelectedTab); 2132Assert.Equal(expected == -1 ? null : control.TabPages[expected], control.SelectedTab); 2142Assert.Equal(expected == -1 ? null : control.TabPages[expected], control.SelectedTab); 2515Assert.Null(control.SelectedTab); 2527Assert.Same(page1, control.SelectedTab); 2542Assert.Null(control.SelectedTab); 2545Assert.Null(control.SelectedTab); 2562Assert.Null(control.SelectedTab); 2568Assert.Null(control.SelectedTab); 2585Assert.Same(page2, control.SelectedTab); 2595Assert.Same(page2, control.SelectedTab); 2605Assert.Null(control.SelectedTab); 2615Assert.Same(page1, control.SelectedTab); 2625Assert.Null(control.SelectedTab); 2648Assert.Null(control.SelectedTab); 2657Assert.Null(control.SelectedTab); 2698Assert.Same(page2, control.SelectedTab); 2717Assert.Same(page2, control.SelectedTab); 2736Assert.Null(control.SelectedTab); 2755Assert.Same(page1, control.SelectedTab); 2774Assert.Null(control.SelectedTab); 3022Assert.Null(control.SelectedTab); 3033Assert.Same(page2, control.SelectedTab); 3043Assert.Same(page2, control.SelectedTab); 3053Assert.Same(page1, control.SelectedTab); 3094Assert.Same(page2, control.SelectedTab); 3114Assert.Same(page2, control.SelectedTab); 3133Assert.Same(page2, control.SelectedTab); 3152Assert.Same(page1, control.SelectedTab); 3207Assert.Null(control.SelectedTab); 3218Assert.Same(page2, control.SelectedTab); 3228Assert.Same(page2, control.SelectedTab); 3238Assert.Same(page1, control.SelectedTab); 3285Assert.Same(page2, control.SelectedTab); 3305Assert.Same(page2, control.SelectedTab); 3324Assert.Same(page2, control.SelectedTab); 3343Assert.Same(page1, control.SelectedTab); 3401Assert.Null(control.SelectedTab); 3412Assert.Same(page2, control.SelectedTab); 3422Assert.Same(page2, control.SelectedTab); 3432Assert.Same(page1, control.SelectedTab); 3473Assert.Same(page2, control.SelectedTab); 3493Assert.Same(page2, control.SelectedTab); 3512Assert.Same(page2, control.SelectedTab); 3531Assert.Same(page1, control.SelectedTab); 5202Assert.Same(page2, control.SelectedTab); 5212Assert.Same(page2, control.SelectedTab); 5222Assert.Same(page1, control.SelectedTab); 5263Assert.Same(page2, control.SelectedTab); 5282Assert.Same(page2, control.SelectedTab); 5301Assert.Same(page1, control.SelectedTab); 5363Assert.Same(page2, control.SelectedTab); 5373Assert.Same(page2, control.SelectedTab); 5383Assert.Same(page1, control.SelectedTab); 5430Assert.Same(page2, control.SelectedTab); 5449Assert.Same(page2, control.SelectedTab); 5468Assert.Same(page1, control.SelectedTab); 5527Assert.Same(page2, control.SelectedTab); 5537Assert.Same(page2, control.SelectedTab); 5547Assert.Same(page1, control.SelectedTab); 5588Assert.Same(page2, control.SelectedTab); 5607Assert.Same(page2, control.SelectedTab); 5626Assert.Same(page1, control.SelectedTab);