53 references to ToolStripDropDownCloseReason
System.Windows.Forms (29)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (18)
25
private
ToolStripDropDownCloseReason
_closeReason =
ToolStripDropDownCloseReason
.AppFocusChange;
961
SetCloseReason(
ToolStripDropDownCloseReason
.CloseCalled);
972
_closeReason =
ToolStripDropDownCloseReason
.AppFocusChange;
975
internal void SetCloseReason(
ToolStripDropDownCloseReason
reason)
980
public void Close(
ToolStripDropDownCloseReason
reason)
1137
Close(
ToolStripDropDownCloseReason
.ItemClicked);
1323
SetCloseReason(
ToolStripDropDownCloseReason
.Keyboard);
1360
SetCloseReason(
ToolStripDropDownCloseReason
.Keyboard);
1376
SetCloseReason(
ToolStripDropDownCloseReason
.Keyboard);
1646
ToolStripDropDownCloseReason
reason = _closeReason;
1653
e.Cancel = e.CloseReason !=
ToolStripDropDownCloseReason
.CloseCalled && !AutoClose;
1678
if ((reason ==
ToolStripDropDownCloseReason
.AppClicked) ||
1679
(reason ==
ToolStripDropDownCloseReason
.ItemClicked) ||
1680
(reason ==
ToolStripDropDownCloseReason
.CloseCalled && topLevelToolStrip == parentToolStrip) ||
1681
(reason ==
ToolStripDropDownCloseReason
.AppFocusChange && topLevelToolStrip == parentToolStrip))
1690
if (reason ==
ToolStripDropDownCloseReason
.ItemClicked)
1743
Debug.Assert(reason !=
ToolStripDropDownCloseReason
.ItemClicked,
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (2)
136
ToolStripManager.ModalMenuFilter.CloseActiveDropDown(DropDown,
ToolStripDropDownCloseReason
.AppClicked);
160
ToolStripManager.ModalMenuFilter.CloseActiveDropDown(DropDown,
ToolStripDropDownCloseReason
.AppClicked);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownClosedEventArgs.cs (2)
8
public ToolStripDropDownClosedEventArgs(
ToolStripDropDownCloseReason
reason)
13
public
ToolStripDropDownCloseReason
CloseReason { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownClosingEventArgs.cs (2)
10
public ToolStripDropDownClosingEventArgs(
ToolStripDropDownCloseReason
reason)
15
public
ToolStripDropDownCloseReason
CloseReason { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (1)
627
parent.SetCloseReason(
ToolStripDropDownCloseReason
.Keyboard);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (2)
292
internal static void CloseActiveDropDown(ToolStripDropDown activeToolStripDropDown,
ToolStripDropDownCloseReason
reason)
348
CloseActiveDropDown(activeToolStripDropDown,
ToolStripDropDownCloseReason
.AppClicked);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
891
ToolStripManager.ModalMenuFilter.CloseActiveDropDown(DropDown,
ToolStripDropDownCloseReason
.AppClicked);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
459
ToolStripManager.ModalMenuFilter.CloseActiveDropDown(DropDown,
ToolStripDropDownCloseReason
.AppClicked);
System.Windows.Forms.Design (8)
System\ComponentModel\Design\DesignerActionUI.cs (2)
587
if (e.CloseReason ==
ToolStripDropDownCloseReason
.ItemClicked)
592
if (e.CloseReason ==
ToolStripDropDownCloseReason
.Keyboard)
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (4)
78
if (e.CloseReason ==
ToolStripDropDownCloseReason
.AppFocusChange && _cancelClose)
87
else if (e.CloseReason is
ToolStripDropDownCloseReason
.AppFocusChange or
ToolStripDropDownCloseReason
.AppClicked)
90
if (Handle == hwndActivating && e.CloseReason ==
ToolStripDropDownCloseReason
.AppClicked)
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1988
e.Cancel = (e.CloseReason ==
ToolStripDropDownCloseReason
.ItemClicked);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
2003
e.Cancel = (e.CloseReason ==
ToolStripDropDownCloseReason
.ItemClicked);
System.Windows.Forms.Tests (16)
System\Windows\Forms\ToolStripDropDownClosedEventArgsTests.cs (3)
10
[InlineData(
ToolStripDropDownCloseReason
.AppClicked)]
11
[InlineData((
ToolStripDropDownCloseReason
.AppFocusChange - 1))]
12
public void Ctor_CloseReason(
ToolStripDropDownCloseReason
closeReason)
System\Windows\Forms\ToolStripDropDownClosingEventArgsTests.cs (3)
10
[InlineData(
ToolStripDropDownCloseReason
.AppClicked)]
11
[InlineData((
ToolStripDropDownCloseReason
.AppFocusChange - 1))]
12
public void Ctor_CloseReason(
ToolStripDropDownCloseReason
closeReason)
System\Windows\Forms\ToolStripDropDownTests.cs (10)
3713
yield return new object[] { null, new ToolStripDropDownClosedEventArgs(
ToolStripDropDownCloseReason
.AppFocusChange) };
3715
yield return new object[] { new SubToolStripItem(), new ToolStripDropDownClosedEventArgs(
ToolStripDropDownCloseReason
.AppFocusChange) };
3729
yield return new object[] { designModeOwnerItem, new ToolStripDropDownClosedEventArgs(
ToolStripDropDownCloseReason
.AppFocusChange) };
3806
yield return new object[] { new ToolStripDropDownClosingEventArgs(
ToolStripDropDownCloseReason
.AppFocusChange) };
4963
[InlineData(
ToolStripDropDownCloseReason
.AppClicked)]
4964
[InlineData(
ToolStripDropDownCloseReason
.AppFocusChange)]
4965
[InlineData(
ToolStripDropDownCloseReason
.CloseCalled)]
4966
[InlineData(
ToolStripDropDownCloseReason
.ItemClicked)]
4967
[InlineData(
ToolStripDropDownCloseReason
.Keyboard)]
4968
public void ToolStripDropDown_Close_InvokeReason_Success(
ToolStripDropDownCloseReason
? reason)