Sdílet prostřednictvím


InkOverlayPaintingEventArgs.ClipRectangle Property

Gets the Rectangle structure that represents the rectangle in which to paint.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public ReadOnly Property ClipRectangle As Rectangle
'Usage
Dim instance As InkOverlayPaintingEventArgs 
Dim value As Rectangle 

value = instance.ClipRectangle
public Rectangle ClipRectangle { get; }
public:
property Rectangle ClipRectangle {
    Rectangle get ();
}
public function get ClipRectangle () : Rectangle

Property Value

Type: System.Drawing.Rectangle
The rectangle in which to paint.

Examples

This C# example creates an event handler for the Painting event, theInkOverlay_Painting. The event handler fills the rectangle where the InkOverlay will be with yellow.

private void theInkOverlay_Painting(object sender, InkOverlayPaintingEventArgs e)
{
    e.Graphics.FillRectangle(new SolidBrush(Color.Yellow), e.ClipRectangle);
}

This Microsoft® Visual Basic® .NET example creates an event handler for the Painting event, theInkOverlay_Painting. The event handler fills the rectangle where the InkOverlay will be with yellow.

Private Sub theInkOverlay_Painting(ByVal sender As Object, ByVal e As Microsoft.Ink.InkOverlayPaintingEventArgs) _
Handles theInkOverlay.Painting
    e.Graphics.FillRectangle(New SolidBrush(Color.Yellow), e.ClipRectangle)
End Sub

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkOverlayPaintingEventArgs Class

InkOverlayPaintingEventArgs Members

Microsoft.Ink Namespace

InkOverlay

InkOverlay.Painting