7 overrides of Focused
System.Windows.Forms (4)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
518public override bool Focused
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.cs (1)
40public override bool Focused => !HideFocusState && base.Focused;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
259public override bool Focused => _upDownEdit.Focused;
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1096public override bool Focused
System.Windows.Forms.Tests (2)
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (1)
620public override bool Focused => _focused;
TextBoxTests.cs (1)
745public override bool Focused => IsFocused;
WindowsFormsIntegration (1)
System\Windows\Integration\ElementHost.cs (1)
218public override bool Focused
226 references to Focused
System.Windows.Forms (111)
System\Windows\Forms\Control.cs (2)
5108if (Focused && ParentInternal is not null) 5125return Focused;
System\Windows\Forms\Control.Ime.cs (3)
180if (Focused) 320if (!DesignMode && (inputLanguageTable != ImeModeConversion.UnsupportedTable) && Focused) 412if (Focused)
System\Windows\Forms\Controls\Buttons\Button.ButtonAccessibleObject.cs (1)
22UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out Control? owner) && owner.Focused),
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (2)
71&& (Control.Focused || Control.MouseIsOver || (Control.IsDefault && Control.Enabled)); 368if (Control.Focused && Control.ShowFocusCues)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (6)
77if (Control.Focused && Control.ShowFocusCues) 82if (!(Control.IsDefault && Control.Focused && (Control.FlatAppearance.BorderSize == 0))) 165if (Control.Focused && Control.ShowFocusCues) 170if (!(Control.IsDefault && Control.Focused && (Control.FlatAppearance.BorderSize == 0))) 259if (Control.Focused && Control.ShowFocusCues) 264if (!(Control.IsDefault && Control.Focused && (Control.FlatAppearance.BorderSize == 0)))
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (2)
32else if (Control.Focused || Control.IsDefault) 170if (Control.Focused && Control.ShowFocusCues)
System\Windows\Forms\Controls\Buttons\CheckBox.CheckBoxAccessibleObject.cs (1)
49UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out Control? owner) && owner.Focused),
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
506if (!Focused)
System\Windows\Forms\Controls\Buttons\RadioButton.RadioButtonAccessibleObject.cs (1)
39UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out RadioButton? owner) && owner.Focused),
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
522if (base.Focused)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (2)
141if (this.TryGetOwnerAs(out DataGridView? owner) && owner.Focused && owner.CurrentCell is not null) 219return (VARIANT)(this.TryGetOwnerAs(out owner) && (IsModal || RowCount == 0) && owner.Focused);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (11)
3134else if (_ptCurrentCell.X == -1 && Focused) 4117if (Focused 5216if ((!onlyIfGridHasFocus || Focused) && EditingControl is not null) 14966if (Focused && EditMode == DataGridViewEditMode.EditOnEnter && _ptCurrentCell.X > -1 && !IsCurrentCellInEditMode) 16714if (Focused && IsGridFocusRectangleEnabled()) 17489if (Focused && IsGridFocusRectangleEnabled() && oldGridFocusRectangle != newGridFocusRectangle) 18855if (Focused && IsGridFocusRectangleEnabled()) 20081if (Focused) 20140if (_dataGridViewState1[State1_LeavingWithTabKey] && Focused) 26977if (Focused 27010if (Focused
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (2)
734if (PaintFocus(paintParts) && cellCurrent && DataGridView.ShowFocusCues && DataGridView.Focused) 883DataGridView.Focused &&
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
1138DataGridView.Focused &&
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
2251DataGridView.Focused &&
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
894&& DataGridView.Focused)
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (3)
981DataGridView.Focused && 1038DataGridView.Focused && 1052DataGridView.Focused &&
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (1)
314dataGridView.Focused &&
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
709if (PaintFocus(paintParts) && DataGridView.ShowFocusCues && DataGridView.Focused && notCollapsed)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
1316if (Focused
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.CheckedListBoxItemAccessibleObject.cs (1)
101if (_owningCheckedListBox.Focused && _owningCheckedListBox.SelectedIndex == -1)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
725if (Focused)
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (2)
49if (this.TryGetOwnerAs(out ListBox? owner) && owner.Focused) 107? (VARIANT)(GetChildCount() == 0 && owner.Focused)
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
1871if (Focused && FocusedItemIsChanged())
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (1)
168UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(_owningListBox.Focused && _owningListBox.FocusedIndex == CurrentIndex),
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (1)
191UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(_owningListView.Focused && Focused),
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
875if (!lv.Focused)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
69bool owningListViewFocused = _owningListView.Focused;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (1)
123UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(_owningListView.Focused && _owningListView.FocusedItem == _owningItem),
System\Windows\Forms\Controls\Menus\MenuStrip.cs (2)
202if (!(Focused || ContainsFocus)) 234if (Focused || !ContainsFocus)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (1)
202internal bool Focused => this.TryGetOwnerAs(out MonthCalendar? owner) && owner.Focused;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.cs (1)
104if (Focused)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (12)
823if (EditTextBox.Focused || DialogButton.Focused || DropDownButton.Focused) 849if (DialogButton.Focused && !gotFocus) 856if (DropDownButton.Focused && !gotFocus) 3882else if (DialogButton.Focused || DropDownButton.Focused) 3899if (DialogButton.Focused || DropDownButton.Focused) 3901OnButtonClick(DialogButton.Focused ? DialogButton : DropDownButton, EventArgs.Empty); 5205if (Focused) 5223if (EditTextBox.Focused || DropDownButton.Focused || DialogButton.Focused)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.cs (1)
40public override bool Focused => !HideFocusState && base.Focused;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObject.cs (1)
70UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out Control? owner) && owner.Focused),
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
1702bool focused = Focused; 1838if (!Focused || GetState(State.SelectFirstControl))
System\Windows\Forms\Controls\TabControl\TabControl.TabControlAccessibleObject.cs (1)
131UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out TabControl? owner) && owner.Focused),
System\Windows\Forms\Controls\TabControl\TabPage.TabPageAccessibleObject.cs (1)
67UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out TabPage? owningTabPage) && owningTabPage.Focused),
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (2)
462if (!_flagState[s_isNullMask] && !Focused && !MaskFull && !DesignMode) 1714includePrompt = !(HidePromptOnLeave && !Focused);
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
980!Focused &&
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseAccessibleObject.cs (1)
39return (VARIANT)owner.Focused;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (7)
432if (!Focused) 1738if (ContainsFocus && !Focused) 2843if (Focused || ContainsFocus) 3977if (!DesignMode && !TabStop && (Focused || ContainsFocus)) 3986if (KeyboardActive && !Focused && !ContainsFocus) 4408if (Focused && (otherHwnd != Handle)) 4414else if (!ContainsFocus && !Focused)
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.ToolStripContainerAccessibleObject.cs (1)
20UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out ToolStripContainer? owner) && owner.Focused),
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (2)
211public virtual bool Focused => ControlInternal.Focused; 350public override bool Selected => _control is not null && _control.Focused;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (2)
86if (!Focused) 243bool focused = MouseIsOver || Focused;
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarAccessibleObject.cs (1)
155UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out TrackBar? owner) && owner.Focused),
System\Windows\Forms\Controls\TreeView\TreeNode.cs (1)
1285if (!tv.Focused)
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
2841Color color = (((curState & TreeNodeStates.Selected) == TreeNodeStates.Selected) && node.TreeView.Focused) ? SystemColors.HighlightText : (node.ForeColor != Color.Empty) ? node.ForeColor : node.TreeView.ForeColor; 3452if (m.LParamInternal == PInvoke.UiaRootObjectId && SupportsUiaProviders && !IsAccessibilityObjectCreated && Focused)
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (1)
86if (owningTreeView.Focused)
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
259public override bool Focused => _upDownEdit.Focused;
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1100if (base.Focused)
System\Windows\Forms\Form.cs (3)
3235if (Focused && ActiveControl is null) 3717return Focused; 4125if (Focused && IsAccessibilityObjectCreated && ActiveControl is null)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1458if (_activeControl == value && (value is null || value.Focused))
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1214if (Focused)
System\Windows\Forms\Layout\Containers\SplitContainer.SplitContainerAccessibleObject.cs (1)
21UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out SplitContainer? owner) && owner.Focused),
System\Windows\Forms\MDI\MdiWindowListStrip.cs (2)
172if (dialog.ActiveChildForm?.ActiveControl is not null && !dialog.ActiveChildForm.ActiveControl.Focused) 190if (boundForm.ActiveControl is not null && !boundForm.ActiveControl.Focused)
System\Windows\Forms\Printing\PrintPreviewControl.cs (2)
320if (!Focused) 719if (!e.ClipRectangle.Contains(focusRect) || !Focused || !ShowFocusCues)
System\Windows\Forms\Printing\PrintPreviewControl.PrintPreviewControlAccessibleObject.cs (1)
23UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)owner.Focused,
System\Windows\Forms\Scrolling\ScrollBar.ScrollBarAccessibleObject.cs (1)
145UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out ScrollBar? owner) && owner.Focused),
System.Windows.Forms.Design (17)
System\ComponentModel\Design\CollectionEditor.FilterListBox.cs (2)
66if (PropertyGrid.Focused || PropertyGrid.ContainsFocus) 94if (PropertyGrid.Focused || PropertyGrid.ContainsFocus)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (3)
164State = Focused ? PushButtonState.Default : PushButtonState.Normal; 236if (Focused) 286else if (Focused)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
310if (_button is { Focused: false, Ellipsis: false })
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (3)
70ButtonRenderer.DrawButton(g, new Rectangle(-1, -1, Width + 2, Height + 2), "…", Font, Focused, buttonState); 119Focused, 153if (Focused)
System\Drawing\Design\ColorEditor.ColorPalette.cs (1)
392if (_focus.X == x && _focus.Y == y && Focused)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1016if (_selectedColumns.Focused)
System\Windows\Forms\Design\DocumentDesigner.cs (1)
1131if (_frame.Focused)
System\Windows\Forms\Design\NavigationalTableLayoutPanel.cs (1)
40if (radioButton.Focused)
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (4)
266_ctrlCheckBox.Focused) 277if (_ctrlCheckBox.Focused) 289if (_shiftCheckBox.Focused) 295if (_resetButton.Focused)
System.Windows.Forms.Design.Tests (1)
System\ComponentModel\Design\ByteViewerTests.cs (1)
77Assert.False(control.Focused);
System.Windows.Forms.Tests (89)
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (4)
520Assert.Equal(focused, dataGridView.Focused); 537Assert.Equal(focused, dataGridView.Focused); 586Assert.Equal(focused, dataGridView.Focused); 605Assert.Equal(focused, dataGridView.Focused);
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (1)
143Assert.True(listBox.Focused);
System\Windows\Forms\AxHostTests.cs (2)
74Assert.False(control.Focused); 168Assert.False(control.Focused);
System\Windows\Forms\ButtonBaseTests.cs (7)
67Assert.False(control.Focused); 8899Assert.False(control.Focused); 8935Assert.False(control.Focused); 8964Assert.False(control.Focused); 9005Assert.False(control.Focused); 9049Assert.False(control.Focused); 9086Assert.False(control.Focused);
System\Windows\Forms\ButtonTests.cs (1)
70Assert.False(control.Focused);
System\Windows\Forms\CheckBoxTests.cs (2)
71Assert.False(control.Focused); 870checkBox.Focused.Should().BeTrue();
System\Windows\Forms\ContainerControlTests.cs (1)
78Assert.False(control.Focused);
System\Windows\Forms\ControlTests.cs (7)
59Assert.False(control.Focused); 148Assert.False(control.Focused); 244Assert.False(control.Focused); 340Assert.False(control.Focused); 436Assert.False(control.Focused); 1021Assert.True(toolStrip1.Focused); 1026Assert.True(toolStrip1.Focused);
System\Windows\Forms\ControlTests.Methods.cs (13)
2104Assert.False(control.Focused); 13503Assert.False(control.Focused); 13539Assert.False(control.Focused); 13572Assert.False(control.Focused); 13613Assert.False(control.Focused); 13657Assert.False(control.Focused); 13698Assert.False(control.Focused); 13838Assert.False(control.Focused); 13874Assert.False(control.Focused); 13903Assert.False(control.Focused); 13944Assert.False(control.Focused); 13988Assert.False(control.Focused); 14025Assert.False(control.Focused);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (1)
75Assert.False(control.Focused);
System\Windows\Forms\DateTimePickerTests.cs (1)
75Assert.False(control.Focused);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
91Assert.False(control.Focused);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (1)
75Assert.False(control.Focused);
System\Windows\Forms\FlowLayoutPanelTests.cs (1)
72Assert.False(control.Focused);
System\Windows\Forms\FormTests.cs (1)
93Assert.False(control.Focused);
System\Windows\Forms\GroupBoxTests.cs (1)
63Assert.False(control.Focused);
System\Windows\Forms\HScrollBarTests.cs (1)
70Assert.False(control.Focused);
System\Windows\Forms\LabelTests.cs (1)
63Assert.False(control.Focused);
System\Windows\Forms\ListBoxTests.cs (1)
70Assert.False(control.Focused);
System\Windows\Forms\ListControlTests.cs (1)
66Assert.False(control.Focused);
System\Windows\Forms\ListViewTests.cs (4)
77Assert.False(control.Focused); 1250Assert.False(control.Focused); 1256Assert.False(control.Focused); 1262Assert.False(control.Focused);
System\Windows\Forms\MdiClientTests.cs (1)
49Assert.False(control.Focused);
System\Windows\Forms\MenuStripTests.cs (1)
78Assert.False(control.Focused);
System\Windows\Forms\MonthCalendarTests.cs (1)
80Assert.False(control.Focused);
System\Windows\Forms\PanelTests.cs (1)
72Assert.False(control.Focused);
System\Windows\Forms\PictureBoxTests.cs (1)
67Assert.False(control.Focused);
System\Windows\Forms\ProgressBarTests.cs (1)
60Assert.False(control.Focused);
System\Windows\Forms\PropertyGridTests.cs (1)
101Assert.False(control.Focused);
System\Windows\Forms\RadioButtonTests.cs (1)
70Assert.False(control.Focused);
System\Windows\Forms\RichTextBoxTests.cs (1)
79Assert.False(control.Focused);
System\Windows\Forms\ScrollableControlTests.cs (1)
71Assert.False(control.Focused);
System\Windows\Forms\ScrollBarTests.cs (1)
60Assert.False(control.Focused);
System\Windows\Forms\SplitterPanelTests.cs (1)
65Assert.False(control.Focused);
System\Windows\Forms\SplitterTests.cs (1)
61Assert.False(control.Focused);
System\Windows\Forms\StatusStripTests.cs (1)
78Assert.False(control.Focused);
System\Windows\Forms\TabControlTests.cs (1)
63Assert.False(control.Focused);
System\Windows\Forms\TableLayoutPanelTests.cs (1)
77Assert.False(control.Focused);
System\Windows\Forms\TabPageTests.cs (2)
77Assert.False(control.Focused); 186Assert.False(control.Focused);
System\Windows\Forms\ToolStripContentPanelTests.cs (1)
74Assert.False(control.Focused);
System\Windows\Forms\ToolStripControlHostTests.cs (3)
84Assert.Equal(c.Focused, item.Focused); 109Assert.Equal(c.Focused, item.Selected); 2694Assert.False(c.Focused);
System\Windows\Forms\ToolStripDropDownTests.cs (1)
83Assert.False(control.Focused);
System\Windows\Forms\ToolStripPanelTests.cs (1)
74Assert.False(control.Focused);
System\Windows\Forms\ToolStripTests.cs (2)
93Assert.False(control.Focused); 247Assert.False(control.Focused);
System\Windows\Forms\TreeViewTests.cs (1)
64Assert.False(control.Focused);
System\Windows\Forms\UserControlTests.cs (1)
78Assert.False(control.Focused);
System\Windows\Forms\VScrollBarTests.cs (1)
69Assert.False(control.Focused);
TextBoxBaseTests.cs (6)
7282Assert.False(control.Focused); 7318Assert.False(control.Focused); 7351Assert.False(control.Focused); 7392Assert.False(control.Focused); 7436Assert.False(control.Focused); 7477Assert.False(control.Focused);
TrackBarTests.cs (1)
62Assert.False(control.Focused);
System.Windows.Forms.UI.IntegrationTests (7)
ListBoxAccesibleObjectTests.cs (2)
24listBox.Focused.Should().BeFalse(); 28listBox.Focused.Should().BeTrue();
ListBoxItemAccessibleObjestTests.cs (2)
59listBox.Focused.Should().BeFalse(); 67listBox.Focused.Should().BeTrue();
MenuStripTests.cs (2)
25menuStrip.Focused.Should().Be(value); 33menuStrip.Focused.Should().Be(value);
PropertyGridTests.cs (1)
37_propertyGrid.Focused.Should().BeFalse();
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
936if (this.Focused || this.ContainsFocus)