Nota:
El acceso a esta página requiere autorización. Puede intentar iniciar sesión o cambiar directorios.
El acceso a esta página requiere autorización. Puede intentar cambiar los directorios.
Actualización: noviembre 2007
Obtiene el rectángulo al que la selección se mueve después del evento SelectionMoving.
Espacio de nombres: Microsoft.Ink
Ensamblado: Microsoft.Ink (en Microsoft.Ink.dll)
Sintaxis
'Declaración
Public ReadOnly Property NewPixelRect As Rectangle
'Uso
Dim instance As InkOverlaySelectionMovingEventArgs
Dim value As Rectangle
value = instance.NewPixelRect
public Rectangle NewPixelRect { get; }
public:
property Rectangle NewPixelRect {
Rectangle get ();
}
/** @property */
public Rectangle get_NewPixelRect()
public function get NewPixelRect () : Rectangle
Valor de propiedad
Tipo: System.Drawing.Rectangle
Rectángulo al que la selección se mueve después del evento SelectionMoving.
Ejemplos
En este ejemplo, un controlador de eventos SelectionMoving examina una selección antes de moverla. Si la selección va a moverse y una parte va a quedar fuera de los límites de la ventana, el controlador de eventos establece la selección en rojo cambiando la propiedad Color de cada objeto Stroke seleccionado.
Private Sub mInkObject_SelectionMoving(ByVal sender As Object, ByVal e As InkOverlaySelectionMovingEventArgs)
If e.NewPixelRect.Left < 0 Or e.NewPixelRect.Top < 0 Or _
e.NewPixelRect.Right > mInkObject.AttachedControl.ClientRectangle.Width Or _
e.NewPixelRect.Bottom > mInkObject.AttachedControl.ClientRectangle.Height Then
For Each stroke As Stroke In mInkObject.Selection
' change the stroke color
stroke.DrawingAttributes.Color = Color.Red
Next
End If
End Sub
private void mInkObject_SelectionMoving(object sender, InkOverlaySelectionMovingEventArgs e)
{
if (e.NewPixelRect.Left < 0 || e.NewPixelRect.Top < 0 ||
e.NewPixelRect.Right > mInkObject.AttachedControl.ClientRectangle.Width ||
e.NewPixelRect.Bottom > mInkObject.AttachedControl.ClientRectangle.Height)
{
foreach (Stroke stroke in mInkObject.Selection)
{
// change the stroke color
stroke.DrawingAttributes.Color = Color.Red;
}
}
}
Plataformas
Windows Vista
.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
Información de versión
.NET Framework
Compatible con: 3.0
Vea también
Referencia
InkOverlaySelectionMovingEventArgs (Clase)
InkOverlaySelectionMovingEventArgs (Miembros)