Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
114 lines (102 sloc) 7.94 KB
<Type Name="InvalidateEventArgs" FullName="System.Windows.Forms.InvalidateEventArgs">
<TypeSignature Language="C#" Value="public class InvalidateEventArgs : EventArgs" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit InvalidateEventArgs extends System.EventArgs" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.InvalidateEventArgs" />
<TypeSignature Language="VB.NET" Value="Public Class InvalidateEventArgs&#xA;Inherits EventArgs" />
<TypeSignature Language="C++ CLI" Value="public ref class InvalidateEventArgs : EventArgs" />
<TypeSignature Language="F#" Value="type InvalidateEventArgs = class&#xA; inherit 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>
</AssemblyInfo>
<Base>
<BaseTypeName>System.EventArgs</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides data for the <see cref="E:System.Windows.Forms.Control.Invalidated" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.Control.Invalidated> event occurs when a control's display is updated. An <xref:System.Windows.Forms.InvalidateEventArgs> specifies the rectangle that contains the invalidated window area.
For information about the event model, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the <xref:System.Windows.Forms.Control.Invalidated> 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> 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.Invalidated> event.
[!code-csharp[System.Windows.Forms.EventExamples#40](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#40)]
[!code-vb[System.Windows.Forms.EventExamples#40](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#40)]
]]></format>
</remarks>
<altmember cref="T:System.Drawing.Graphics" />
<altmember cref="T:System.Drawing.Rectangle" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public InvalidateEventArgs (System.Drawing.Rectangle invalidRect);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Drawing.Rectangle invalidRect) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.InvalidateEventArgs.#ctor(System.Drawing.Rectangle)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (invalidRect As Rectangle)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; InvalidateEventArgs(System::Drawing::Rectangle invalidRect);" />
<MemberSignature Language="F#" Value="new System.Windows.Forms.InvalidateEventArgs : System.Drawing.Rectangle -&gt; System.Windows.Forms.InvalidateEventArgs" Usage="new System.Windows.Forms.InvalidateEventArgs invalidRect" />
<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>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="invalidRect" Type="System.Drawing.Rectangle" />
</Parameters>
<Docs>
<param name="invalidRect">The <see cref="T:System.Drawing.Rectangle" /> that contains the invalidated window area.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.InvalidateEventArgs" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="InvalidRect">
<MemberSignature Language="C#" Value="public System.Drawing.Rectangle InvalidRect { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Rectangle InvalidRect" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.InvalidateEventArgs.InvalidRect" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property InvalidRect As Rectangle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Rectangle InvalidRect { System::Drawing::Rectangle get(); };" />
<MemberSignature Language="F#" Value="member this.InvalidRect : System.Drawing.Rectangle" Usage="System.Windows.Forms.InvalidateEventArgs.InvalidRect" />
<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>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Rectangle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.Drawing.Rectangle" /> that contains the invalidated window area.</summary>
<value>The invalidated window area.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## 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.Invalidated?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.Invalidated?displayProperty=nameWithType> event.
[!code-csharp[System.Windows.Forms.EventExamples#40](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs#40)]
[!code-vb[System.Windows.Forms.EventExamples#40](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb#40)]
]]></format>
</remarks>
<altmember cref="T:System.Drawing.Rectangle" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.