257 lines
13 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<Type Name="DragEventArgs" FullName="System.Windows.Forms.DragEventArgs">
<TypeSignature Language="C#" Value="public class DragEventArgs : EventArgs" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.EventArgs</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="E:System.Windows.Forms.Control.DragDrop" /> event occurs when the user completes a drag-and-drop operation by dragging an object over the control and then dropping it onto the control by releasing the mouse button. The <see cref="E:System.Windows.Forms.Control.DragEnter" /> event occurs when the user moves the mouse pointer onto the control while dragging an object with the mouse. The <see cref="E:System.Windows.Forms.Control.DragOver" /> event occurs when the user moves the mouse pointer over the control while dragging an object with the mouse.</para>
<para>A <see cref="T:System.Windows.Forms.DragEventArgs" /> object specifies any data associated with this event; the current state of the SHIFT, CTRL, and ALT keys; the location of the mouse pointer; and the drag-and-drop effects allowed by the source and target of the drag event.</para>
<para>For information about the event model, see <format type="text/html"><a href="D98FD58B-FA4F-4598-8378-ADDF4355A115">[&lt;topic://cpconEventsDelegates&gt;]</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Provides data for the <see cref="E:System.Windows.Forms.Control.DragDrop" />, <see cref="E:System.Windows.Forms.Control.DragEnter" />, or <see cref="E:System.Windows.Forms.Control.DragOver" /> event.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DragEventArgs (System.Windows.Forms.IDataObject data, int keyState, int x, int y, System.Windows.Forms.DragDropEffects allowedEffect, System.Windows.Forms.DragDropEffects effect);" />
<MemberType>Constructor</MemberType>
<Parameters>
<Parameter Name="data" Type="System.Windows.Forms.IDataObject" />
<Parameter Name="keyState" Type="System.Int32" />
<Parameter Name="x" Type="System.Int32" />
<Parameter Name="y" Type="System.Int32" />
<Parameter Name="allowedEffect" Type="System.Windows.Forms.DragDropEffects" />
<Parameter Name="effect" Type="System.Windows.Forms.DragDropEffects" />
</Parameters>
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Windows.Forms.DragEventArgs" /> class.</para>
</summary>
<param name="data">
<attribution license="cc4" from="Microsoft" modified="false" />The data associated with this event. </param>
<param name="keyState">
<attribution license="cc4" from="Microsoft" modified="false" />The current state of the SHIFT, CTRL, and ALT keys. </param>
<param name="x">
<attribution license="cc4" from="Microsoft" modified="false" />The x-coordinate of the mouse cursor in pixels. </param>
<param name="y">
<attribution license="cc4" from="Microsoft" modified="false" />The y-coordinate of the mouse cursor in pixels. </param>
<param name="allowedEffect">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Windows.Forms.DragDropEffects" /> values. </param>
<param name="effect">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Windows.Forms.DragDropEffects" /> values. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="AllowedEffect">
<MemberSignature Language="C#" Value="public System.Windows.Forms.DragDropEffects AllowedEffect { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Windows.Forms.DragDropEffects</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When a control initiates a drag-and-drop operation by calling the <see cref="M:System.Windows.Forms.Control.DoDragDrop(System.Object,System.Windows.Forms.DragDropEffects)" /> method, it specifies the permissible effects of the operation. For example, when you drag a file from a source, if the file is read-only (or from a read-only storage medium such as a CD), the source will indicate that the file can be copied, but not transferred, to the target.</para>
<para>Before attempting to perform an operation on the dragged data, you should examine this property to ensure that the operation is allowed.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets which drag-and-drop operations are allowed by the originator (or source) of the drag event.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Data">
<MemberSignature Language="C#" Value="public System.Windows.Forms.IDataObject Data { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Windows.Forms.IDataObject</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>In the body of your event handler, you can use the <see cref="M:System.Windows.Forms.IDataObject.GetDataPresent(System.String,System.Boolean)" /> method to determine whether the data matches the format requirements of the control onto which the data is being dragged. You also can specify whether you want to attempt to convert the data to meet your format requirements. If the dragged data meets your format requirements, use the <see cref="M:System.Windows.Forms.IDataObject.GetData(System.String,System.Boolean)" /> method to retrieve the data.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the <see cref="T:System.Windows.Forms.IDataObject" /> that contains the data associated with this event.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Effect">
<MemberSignature Language="C#" Value="public System.Windows.Forms.DragDropEffects Effect { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Windows.Forms.DragDropEffects</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>By default, the effect applied determines the mouse cursor for the target of a drag-and-drop operation. This is useful to provide feedback to the user on the operation that will occur. For example, if you press the CTRL key when you drag a file from a source, specify <see cref="F:System.Windows.Forms.DragDropEffects.Copy" /> to indicate the target will try to perform a copy operation.</para>
<para>To use custom cursors for a drag operation, see <see cref="P:System.Windows.Forms.GiveFeedbackEventArgs.UseDefaultCursors" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets the target drop effect in a drag-and-drop operation.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="KeyState">
<MemberSignature Language="C#" Value="public int KeyState { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>You can make the effect of a drag-and-drop operation to depend on the state of a particular key. For example, you may decide to copy or move data depending on whether the CTRL or SHIFT keys are pressed during the drag-and-drop operation.</para>
<para>The bits that are set in the <see cref="P:System.Windows.Forms.DragEventArgs.KeyState" /> 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 <see cref="P:System.Windows.Forms.DragEventArgs.KeyState" /> property is set. You can use the bitwise AND operator to test for a given key state.</para>
<para>The following table lists the values that are used for a specified event.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Value</para>
</term>
<description>
<para>Key </para>
</description>
</item>
</listheader>
<item>
<term>
<para>1 (bit 0)</para>
</term>
<description>
<para>The left mouse button. </para>
</description>
</item>
<item>
<term>
<para>2 (bit 1)</para>
</term>
<description>
<para>The right mouse button. </para>
</description>
</item>
<item>
<term>
<para>4 (bit 2)</para>
</term>
<description>
<para>The SHIFT key. </para>
</description>
</item>
<item>
<term>
<para>8 (bit 3)</para>
</term>
<description>
<para>The CTRL key. </para>
</description>
</item>
<item>
<term>
<para>16 (bit 4)</para>
</term>
<description>
<para>The middle mouse button. </para>
</description>
</item>
<item>
<term>
<para>32 (bit 5)</para>
</term>
<description>
<para>The ALT key. </para>
</description>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the current state of the SHIFT, CTRL, and ALT keys, as well as the state of the mouse buttons.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="X">
<MemberSignature Language="C#" Value="public int X { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the x-coordinate of the mouse pointer, in screen coordinates.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Y">
<MemberSignature Language="C#" Value="public int Y { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the y-coordinate of the mouse pointer, in screen coordinates.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
</Members>
</Type>