Thumb.DragStarted Evento

Definición

Se produce cuando un Thumb control recibe el foco lógico y la captura del mouse.

public:
 event System::Windows::Controls::Primitives::DragStartedEventHandler ^ DragStarted;
public event System.Windows.Controls.Primitives.DragStartedEventHandler DragStarted;
member this.DragStarted : System.Windows.Controls.Primitives.DragStartedEventHandler 
Public Custom Event DragStarted As DragStartedEventHandler 

Tipo de evento

Ejemplos

En el ejemplo siguiente se muestra cómo asignar un controlador de eventos para el DragStarted evento a un Thumb control y cómo definir el controlador de eventos. Para obtener el ejemplo completo, consulte Ejemplo de funcionalidad de arrastre de pulgares.

<Thumb Name="myThumb" Canvas.Left="80" Canvas.Top="80" Background="Blue" 
      Width="20" Height="20" DragDelta="onDragDelta" 
      DragStarted="onDragStarted" DragCompleted="onDragCompleted"
      />
void onDragStarted(object sender, DragStartedEventArgs e)
{
    myThumb.Background = Brushes.Orange;
}
Private Sub onDragStarted(ByVal sender As Object, ByVal e As DragStartedEventArgs)
    myThumb.Background = Brushes.Orange
End Sub

Comentarios

El Thumb control recibe el foco y la captura del mouse cuando el usuario presiona el botón izquierdo del mouse mientras pausa el puntero del mouse sobre .Thumb

Información del evento enrutado

Elemento Value
Campo identificador DragStartedEvent
Estrategia de enrutamiento Bubbling
Delegado DragStartedEventHandler

Se aplica a

Consulte también