-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
QueryContinueDragEventArgs.xml
272 lines (241 loc) · 19.4 KB
/
QueryContinueDragEventArgs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<Type Name="QueryContinueDragEventArgs" FullName="System.Windows.Forms.QueryContinueDragEventArgs">
<TypeSignature Language="C#" Value="public class QueryContinueDragEventArgs : EventArgs" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit QueryContinueDragEventArgs extends System.EventArgs" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.QueryContinueDragEventArgs" />
<TypeSignature Language="VB.NET" Value="Public Class QueryContinueDragEventArgs
Inherits EventArgs" />
<TypeSignature Language="F#" Value="type QueryContinueDragEventArgs = class
 inherit EventArgs" />
<TypeSignature Language="C++ CLI" Value="public ref class QueryContinueDragEventArgs : EventArgs" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.EventArgs</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1">
<AttributeName Language="C#">[System.Runtime.InteropServices.ComVisible(true)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.InteropServices.ComVisible(true)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides data for the <see cref="E:System.Windows.Forms.Control.QueryContinueDrag" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.Control.QueryContinueDrag> event occurs during a drag-and-drop operation and allows the drag source to determine whether the drag-and-drop operation should be canceled. A <xref:System.Windows.Forms.QueryContinueDragEventArgs> specifies whether and how the drag-and-drop operation should proceed, whether any modifier keys are pressed, and whether the user has pressed the ESC key.
By default, the <xref:System.Windows.Forms.Control.QueryContinueDrag> event sets <xref:System.Windows.Forms.QueryContinueDragEventArgs.Action%2A> to <xref:System.Windows.Forms.DragAction.Cancel?displayProperty=nameWithType> if the ESC key was pressed and sets `Action` to <xref:System.Windows.Forms.DragAction.Drop?displayProperty=nameWithType> if the left, middle, or right mouse button is pressed.
For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/).
## Examples
This code excerpt demonstrates using the <xref:System.Windows.Forms.QueryContinueDragEventArgs> class with the <xref:System.Windows.Forms.Control.QueryContinueDrag> event. See the <xref:System.Windows.Forms.Control.DoDragDrop%2A> method for the complete code example.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/VB/form1.vb" id="Snippet6":::
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.DragAction" />
<altmember cref="M:System.Windows.Forms.Control.DoDragDrop(System.Object,System.Windows.Forms.DragDropEffects)" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public QueryContinueDragEventArgs (int keyState, bool escapePressed, System.Windows.Forms.DragAction action);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 keyState, bool escapePressed, valuetype System.Windows.Forms.DragAction action) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.QueryContinueDragEventArgs.#ctor(System.Int32,System.Boolean,System.Windows.Forms.DragAction)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (keyState As Integer, escapePressed As Boolean, action As DragAction)" />
<MemberSignature Language="F#" Value="new System.Windows.Forms.QueryContinueDragEventArgs : int * bool * System.Windows.Forms.DragAction -> System.Windows.Forms.QueryContinueDragEventArgs" Usage="new System.Windows.Forms.QueryContinueDragEventArgs (keyState, escapePressed, action)" />
<MemberSignature Language="C++ CLI" Value="public:
 QueryContinueDragEventArgs(int keyState, bool escapePressed, System::Windows::Forms::DragAction action);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="keyState" Type="System.Int32" />
<Parameter Name="escapePressed" Type="System.Boolean" />
<Parameter Name="action" Type="System.Windows.Forms.DragAction" />
</Parameters>
<Docs>
<param name="keyState">The current state of the SHIFT, CTRL, and ALT keys.</param>
<param name="escapePressed">
<see langword="true" /> if the ESC key was pressed; otherwise, <see langword="false" />.</param>
<param name="action">A <see cref="T:System.Windows.Forms.DragAction" /> value.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.QueryContinueDragEventArgs" /> class.</summary>
<remarks>To be added.</remarks>
<altmember cref="T:System.Windows.Forms.DragAction" />
<altmember cref="M:System.Windows.Forms.Control.DoDragDrop(System.Object,System.Windows.Forms.DragDropEffects)" />
</Docs>
</Member>
<Member MemberName="Action">
<MemberSignature Language="C#" Value="public System.Windows.Forms.DragAction Action { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.DragAction Action" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.QueryContinueDragEventArgs.Action" />
<MemberSignature Language="VB.NET" Value="Public Property Action As DragAction" />
<MemberSignature Language="F#" Value="member this.Action : System.Windows.Forms.DragAction with get, set" Usage="System.Windows.Forms.QueryContinueDragEventArgs.Action" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Windows::Forms::DragAction Action { System::Windows::Forms::DragAction get(); void set(System::Windows::Forms::DragAction value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.DragAction</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the status of a drag-and-drop operation.</summary>
<value>A <see cref="T:System.Windows.Forms.DragAction" /> value.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By default, the <xref:System.Windows.Forms.Control.QueryContinueDrag> event sets <xref:System.Windows.Forms.QueryContinueDragEventArgs.Action%2A> to <xref:System.Windows.Forms.DragAction.Cancel?displayProperty=nameWithType> if the ESC key was pressed and sets `Action` to <xref:System.Windows.Forms.DragAction.Drop?displayProperty=nameWithType> if the left, middle, or right mouse button is pressed.
## Examples
This code excerpt demonstrates using the <xref:System.Windows.Forms.QueryContinueDragEventArgs> class with the <xref:System.Windows.Forms.Control.QueryContinueDrag> event. See the <xref:System.Windows.Forms.Control.DoDragDrop%2A> method for the complete code example.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/VB/form1.vb" id="Snippet6":::
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.DragAction" />
<altmember cref="M:System.Windows.Forms.Control.DoDragDrop(System.Object,System.Windows.Forms.DragDropEffects)" />
</Docs>
</Member>
<Member MemberName="EscapePressed">
<MemberSignature Language="C#" Value="public bool EscapePressed { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool EscapePressed" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.QueryContinueDragEventArgs.EscapePressed" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property EscapePressed As Boolean" />
<MemberSignature Language="F#" Value="member this.EscapePressed : bool" Usage="System.Windows.Forms.QueryContinueDragEventArgs.EscapePressed" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool EscapePressed { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets whether the user pressed the ESC key.</summary>
<value>
<see langword="true" /> if the ESC key was pressed; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By default, the <xref:System.Windows.Forms.Control.QueryContinueDrag> event sets <xref:System.Windows.Forms.QueryContinueDragEventArgs.Action%2A> to <xref:System.Windows.Forms.DragAction.Cancel?displayProperty=nameWithType> if <xref:System.Windows.Forms.QueryContinueDragEventArgs.EscapePressed%2A> is true.
## Examples
The following code example demonstrates the use of the <xref:System.Windows.Forms.QueryContinueDragEventArgs.EscapePressed%2A> . In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.Control.QueryContinueDrag?displayProperty=nameWithType> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.Control>, such as a <xref:System.Windows.Forms.Button> or <xref:System.Windows.Forms.ComboBox>. Then name the instance `Control1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.Control.QueryContinueDrag?displayProperty=nameWithType> event.
:::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet43":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet43":::
]]></format>
</remarks>
<altmember cref="M:System.Windows.Forms.Control.DoDragDrop(System.Object,System.Windows.Forms.DragDropEffects)" />
</Docs>
</Member>
<Member MemberName="KeyState">
<MemberSignature Language="C#" Value="public int KeyState { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 KeyState" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.QueryContinueDragEventArgs.KeyState" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property KeyState As Integer" />
<MemberSignature Language="F#" Value="member this.KeyState : int" Usage="System.Windows.Forms.QueryContinueDragEventArgs.KeyState" />
<MemberSignature Language="C++ CLI" Value="public:
 property int KeyState { int get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the current state of the SHIFT, CTRL, and ALT keys.</summary>
<value>The current state of the SHIFT, CTRL, and ALT keys.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The bits that are set in the <xref:System.Windows.Forms.QueryContinueDragEventArgs.KeyState%2A> property identify the keys or mouse buttons that were pressed during the operation. For example, if the left mouse button is pressed, the first bit in the <xref:System.Windows.Forms.QueryContinueDragEventArgs.KeyState%2A> property is set. You can use the bitwise `AND` operator to test for a given key state.
The following table lists the bits that are set for a specified event.
|Bit|Key|
|---------|---------|
|1|The left mouse button.|
|2|The right mouse button.|
|4|The SHIFT key.|
|8|The CTL key.|
|16|The middle mouse button.|
|32|The ALT key.|
By default, the <xref:System.Windows.Forms.Control.QueryContinueDrag> event sets <xref:System.Windows.Forms.QueryContinueDragEventArgs.Action%2A> to <xref:System.Windows.Forms.DragAction.Drop?displayProperty=nameWithType> if <xref:System.Windows.Forms.QueryContinueDragEventArgs.KeyState%2A> indicates that the left, middle, or right mouse button is pressed.
## Examples
The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.Control.QueryContinueDrag?displayProperty=nameWithType> event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing <xref:System.Windows.Forms.MessageBox.Show%2A?displayProperty=nameWithType> with <xref:System.Console.WriteLine%2A?displayProperty=nameWithType> or appending the message to a multiline <xref:System.Windows.Forms.TextBox>.
To run the example code, paste it into a project that contains an instance of a type that inherits from <xref:System.Windows.Forms.Control>, such as a <xref:System.Windows.Forms.Button> or <xref:System.Windows.Forms.ComboBox>. Then name the instance `Control1` and ensure that the event handler is associated with the <xref:System.Windows.Forms.Control.QueryContinueDrag?displayProperty=nameWithType> event.
:::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet43":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet43":::
]]></format>
</remarks>
<altmember cref="M:System.Windows.Forms.Control.DoDragDrop(System.Object,System.Windows.Forms.DragDropEffects)" />
</Docs>
</Member>
</Members>
</Type>