Condividi tramite


Delegato InkOverlayPaintingEventHandler

Aggiornamento: novembre 2007

Rappresenta il metodo che gestisce l'evento Painting di un oggetto InkOverlay.

Spazio dei nomi:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Sintassi

'Dichiarazione
Public Delegate Sub InkOverlayPaintingEventHandler ( _
    sender As Object, _
    e As InkOverlayPaintingEventArgs _
)
'Utilizzo
Dim instance As New InkOverlayPaintingEventHandler(AddressOf HandlerMethod)
public delegate void InkOverlayPaintingEventHandler(
    Object sender,
    InkOverlayPaintingEventArgs e
)
public delegate void InkOverlayPaintingEventHandler(
    Object^ sender, 
    InkOverlayPaintingEventArgs^ e
)
/** @delegate */
public delegate void InkOverlayPaintingEventHandler(
    Object sender,
    InkOverlayPaintingEventArgs e
)
JScript non supporta i delegati.

Parametri

Note

Quando si crea un delegato InkOverlayPaintingEventHandler, viene identificato il metodo che gestisce l'evento. Per associare l'evento al gestore in uso, aggiungere all'evento un'istanza del delegato. Il gestore eventi viene chiamato ogni volta che si verifica l'evento, a meno che non si rimuova il delegato. Per motivi di prestazioni, l'interesse dell'evento predefinito è disattivato nel codice gestito, ma viene attivato automaticamente se si aggiunge un gestore eventi.

Esempi

In questo esempio, il gestore dell'evento Painting viene utilizzato per disegnare uno sfondo con righe nell'area di disegno dell'input penna.

Private Sub mInkObject_Painting(ByVal sender As Object, ByVal e As InkOverlayPaintingEventArgs)
    Dim hBrush As Brush = New HatchBrush(HatchStyle.Horizontal, Color.LightGray, Color.White)
    e.Graphics.FillRectangle(hBrush, e.ClipRectangle)
End Sub
private void mInkObject_Painting(object sender, InkOverlayPaintingEventArgs e)
{
    Brush hBrush = new HatchBrush(HatchStyle.Horizontal, Color.LightGray, Color.White);
    e.Graphics.FillRectangle(hBrush, e.ClipRectangle);
}

Piattaforme

Windows Vista

.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.

Informazioni sulla versione

.NET Framework

Supportato in: 3.0

Vedere anche

Riferimenti

Spazio dei nomi Microsoft.Ink

InkOverlayPaintedEventHandler