ImageShape.OnPaintSelection (Método)

Muestra un resaltado de selección en la imagen.

Espacio de nombres:  Microsoft.VisualStudio.Modeling.Diagrams
Ensamblado:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (en Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll)

Sintaxis

'Declaración
Public Overrides Sub OnPaintSelection ( _
    e As DiagramPaintEventArgs _
)
public override void OnPaintSelection(
    DiagramPaintEventArgs e
)

Parámetros

Comentarios

Invalide este método para cambiar cómo se muestra la imagen cuando esta forma está seleccionado.Por ejemplo, puede que desee mostrar otra imagen.

El comportamiento predeterminado invoca el método de DoPaintSelection de la propiedad de ShapeGeometry .

Ejemplos

public override void OnPaintSelection(DiagramPaintEventArgs e)
{
DiagramItem thisItem = new DiagramItem(this);
bool isSelected = e.View.Selection.Contains(thisItem);
bool isPrimary = thisItem.Equals(e.View.Selection.PrimaryItem);
bool isFocused = e.View.Selection.Count > 1 
           && thisItem.Equals(e.View.Selection.FocusedItem);
this.ShapeGeometry.DoPaintSelection(e, this, isSelected, isFocused, isPrimary);
}

Seguridad de .NET Framework

Vea también

Referencia

ImageShape Clase

Microsoft.VisualStudio.Modeling.Diagrams (Espacio de nombres)