a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
100 lines
6.2 KiB
XML
100 lines
6.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Type Name="AddingNewEventArgs" FullName="System.ComponentModel.AddingNewEventArgs">
|
|
<TypeSignature Language="C#" Value="public class AddingNewEventArgs : EventArgs" />
|
|
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit AddingNewEventArgs extends System.EventArgs" />
|
|
<AssemblyInfo>
|
|
<AssemblyName>System</AssemblyName>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Base>
|
|
<BaseTypeName>System.EventArgs</BaseTypeName>
|
|
</Base>
|
|
<Interfaces />
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The <see cref="T:System.ComponentModel.AddingNewEventArgs" /> class provides data for the <see cref="E:System.Windows.Forms.BindingSource.AddingNew" /> event, which signals that an item is about to be added to a collection. The event gives the programmer, within the event handler <see cref="T:System.ComponentModel.AddingNewEventHandler" />, the option of supplying the new object by setting the <see cref="P:System.ComponentModel.AddingNewEventArgs.NewObject" /> property to this new item. If this property is not set, the collection will typically use the default constructor of the appropriate type to construct a new item. In either case, the new item will be added to the collection. </para>
|
|
<para>If the collection also implements the <see cref="T:System.ComponentModel.ICancelAddNew" /> interface, the item will be provisionally added, waiting a subsequent commit or rollback.</para>
|
|
<para>This event is commonly used in data-binding scenarios, within classes such as <see cref="T:System.Windows.Forms.BindingSource" /> and <see cref="T:System.ComponentModel.BindingList`1" />. </para>
|
|
<para>For more information about handling events, see <format type="text/html"><a href="01e4f1bc-e55e-413f-98c7-6588493e5f67">Consuming Events</a></format>. </para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Provides data for the <see cref="E:System.Windows.Forms.BindingSource.AddingNew" /> event.</para>
|
|
</summary>
|
|
</Docs>
|
|
<Members>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public AddingNewEventArgs ();" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
|
|
<MemberType>Constructor</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Parameters />
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The default constructor sets the <see cref="P:System.ComponentModel.AddingNewEventArgs.NewObject" /> property to null. A value that is null indicates that, if the <see cref="T:System.ComponentModel.AddingNewEventHandler" /> does not explicitly set this property, the collection will take standard steps to provide a new item to add to itself.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Initializes a new instance of the <see cref="T:System.ComponentModel.AddingNewEventArgs" /> class using no parameters.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public AddingNewEventArgs (object newObject);" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(object newObject) cil managed" />
|
|
<MemberType>Constructor</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Parameters>
|
|
<Parameter Name="newObject" Type="System.Object" />
|
|
</Parameters>
|
|
<Docs>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The <see cref="M:System.ComponentModel.AddingNewEventArgs.#ctor(System.Object)" /> constructor sets the <see cref="P:System.ComponentModel.AddingNewEventArgs.NewObject" /> property to the <paramref name="newObject" /> parameter. This object will be used as the new item to be added to the associated collection, unless this property is updated by the event handler.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Initializes a new instance of the <see cref="T:System.ComponentModel.AddingNewEventArgs" /> class using the specified object as the new item.</para>
|
|
</summary>
|
|
<param name="newObject">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Object" /> to use as the new item value.</param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="NewObject">
|
|
<MemberSignature Language="C#" Value="public object NewObject { get; set; }" />
|
|
<MemberSignature Language="ILAsm" Value=".property instance object NewObject" />
|
|
<MemberType>Property</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Object</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<value>To be added.</value>
|
|
<since version=".NET 2.0" />
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>If the <see cref="P:System.ComponentModel.AddingNewEventArgs.NewObject" /> property is set to null, it indicates that the collection is to take the standard action, which typically entails creating an object of the appropriate type using its default constructor, and then adding it to the collection.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets or sets the object to be added to the binding list. </para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
</Members>
|
|
</Type> |