次の方法で共有


InkOverlayPaintingEventArgs.Graphics Property

InkOverlayPaintingEventArgs.Graphics Property

Gets the Graphics Leave Site object that is used to paint the item.

Definition

Visual Basic .NET Public ReadOnly Property Graphics As Graphics
C# public Graphics Graphics { get; }
Managed C++ public: __property Graphics* get_Graphics();

Property Value

System.Drawing.Graphics. The object that is used to paint the item.

This property is read-only. This property has no default value.

Examples

[C#]

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);
}
        

[Visual Basic .NET]

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
        

See Also