5 overrides of CanSelect
System.Windows.Forms (4)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
88public override bool CanSelect => _control is not null && (DesignMode || _control.CanSelect);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (1)
27public override bool CanSelect => false;
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (1)
65public override bool CanSelect
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
48public override bool CanSelect => DesignMode;
System.Windows.Forms.Tests (1)
System\Windows\Forms\ToolStripItemTests.cs (1)
15475public override bool CanSelect => false;
27 references to CanSelect
System.Windows.Forms (9)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (6)
581internal virtual bool CanKeyboardSelect => CanSelect; 1586public virtual bool Pressed => CanSelect && _state[s_statePressed]; 1765=> CanSelect && !DesignMode && (_state[s_stateSelected] || 2494if (Enabled && CanSelect && !Selected) 3023if (!CanSelect || !Enabled || DesignMode) 3120if (!CanSelect)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (2)
112UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)_ownerItem.CanSelect, 164if (!_ownerItem.CanSelect)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
202if (item.CanSelect)
System.Windows.Forms.Tests (18)
System\Windows\Forms\ToolStripButtonTests.cs (7)
34Assert.True(item.CanSelect); 115Assert.True(item.CanSelect); 202Assert.True(item.CanSelect); 292Assert.True(item.CanSelect); 380Assert.True(item.CanSelect); 478Assert.True(item.CanSelect); 1067Assert.Equal(item.CanSelect, item.Selected);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
33Assert.True(item.CanSelect); 122Assert.True(item.CanSelect); 221Assert.True(item.CanSelect); 321Assert.True(item.CanSelect);
System\Windows\Forms\ToolStripItemTests.cs (5)
36Assert.True(item.CanSelect); 121Assert.True(item.CanSelect); 216Assert.True(item.CanSelect); 14263Assert.Equal(item.CanSelect, item.Selected); 14267Assert.Equal(item.CanSelect, item.Selected);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
34Assert.True(item.CanSelect);
System\Windows\Forms\ToolStripTests.cs (1)
5832Assert.Equal(item.CanSelect, item.Selected);