48 references to SelectionMode
System.Windows.Forms (48)
winforms\Managed\System\WinForms\CheckedListBox.cs (12)
296public override SelectionMode SelectionMode { 302if (!ClientUtils.IsEnumValid(value, (int)value, (int)SelectionMode.None, (int)SelectionMode.MultiExtended)){ 303throw new InvalidEnumArgumentException("value", (int)value, typeof(SelectionMode)); 305if (value != SelectionMode.One 306&& value != SelectionMode.None) { 735Color backColor = (SelectionMode != SelectionMode.None) ? e.BackColor : BackColor; 736Color foreColor = (SelectionMode != SelectionMode.None) ? e.ForeColor : ForeColor; 744if (SelectionMode != SelectionMode.None && (e.State & DrawItemState.Selected) == DrawItemState.Selected) { 846Color backColor = (SelectionMode != SelectionMode.None) ? e.BackColor : BackColor; 855Color foreColor = (SelectionMode != SelectionMode.None) ? e.ForeColor : ForeColor; 911if (e.KeyChar == ' ' && SelectionMode != SelectionMode.None) {
winforms\Managed\System\WinForms\ListBox.cs (36)
114SelectionMode selectionMode = System.Windows.Forms.SelectionMode.One; 117SelectionMode cachedSelectionMode = System.Windows.Forms.SelectionMode.One; 361case SelectionMode.None: 364case SelectionMode.MultiSimple: 367case SelectionMode.MultiExtended: 370case SelectionMode.One: 844return selectionMode != SelectionMode.None; 866SelectionMode current = (selectionModeChanging) ? cachedSelectionMode : selectionMode; 868if (current == SelectionMode.None) { 872if (current == SelectionMode.One && IsHandleCreated) { 890if (selectionMode == SelectionMode.None) { 894if (selectionMode == SelectionMode.One && value != -1) { 1016DefaultValue(SelectionMode.One), 1019public virtual SelectionMode SelectionMode { 1024if (!ClientUtils.IsEnumValid(value, (int)value, (int)SelectionMode.None, (int)SelectionMode.MultiExtended)) 1026throw new InvalidEnumArgumentException("value", (int)value, typeof(SelectionMode)); 1087if (SelectionMode != SelectionMode.None && SelectedItem != null) { 1104if (SelectionMode != SelectionMode.None && value != null && (SelectedItem == null || !value.Equals(GetItemText(SelectedItem)))) { 1669Debug.Assert(selectionMode != SelectionMode.None, "Guard against setting selection for None selection mode outside this code."); 1671if (selectionMode == SelectionMode.One) { 1698case SelectionMode.One: 1703case SelectionMode.MultiSimple: 1704case SelectionMode.MultiExtended: 1792if (selectionMode != SelectionMode.None) { 1800if (selectedItems.Count > 0 && selectionMode == SelectionMode.One) { 1939if (SelectionMode != SelectionMode.None && this.DataManager != null) 2012if (SelectionMode != SelectionMode.None) { 2133if (selectionMode == SelectionMode.None) 4138SelectionMode current = (owner.selectionModeChanging) ? owner.cachedSelectionMode : owner.selectionMode; 4141case SelectionMode.None: 4144case SelectionMode.One: 4151case SelectionMode.MultiSimple: 4152case SelectionMode.MultiExtended: