Thumb DragStarted and DragCompleted event handler
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Thumb_wcp.Pane1">
<StackPanel>
<Thumb Name="myThumb" Background="Blue"
Width="20" Height="20"
DragStarted="onDragStarted" DragCompleted="onDragCompleted"/>
</StackPanel>
</Canvas>
//File:Window.xaml.vb
Imports System
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Controls.Primitives
Imports System.Windows.Documents
Imports System.Windows.Navigation
Imports System.Windows.Shapes
Imports System.Windows.Data
Imports System.Windows.Media
Namespace Thumb_wcp
Public Partial Class Pane1
Inherits Canvas
Private Sub onDragStarted(sender As Object, e As DragStartedEventArgs)
myThumb.Background = Brushes.Orange
End Sub
Private Sub onDragCompleted(sender As Object, e As DragCompletedEventArgs)
myThumb.Background = Brushes.Blue
End Sub
End Class
End Namespace
Related examples in the same category