//File:Window.xaml.vb Imports System Imports System.Windows Imports System.Windows.Input Imports System.Windows.Media Imports System.Windows.Controls Public Partial Class AboutDialog Inherits Window Public Sub New() InitializeComponent() End Sub Private Sub AboutDialog_MouseRightButtonDown(sender As Object, e As MouseButtonEventArgs) Console.WriteLine("Source = " & e.Source.[GetType]().Name) Console.WriteLine("OriginalSource = " & e.OriginalSource.[GetType]().Name & " @ " & e.Timestamp) Dim source As Control = TryCast(e.Source, Control) If source.BorderThickness <> New Thickness(5) Then source.BorderThickness = New Thickness(5) source.BorderBrush = Brushes.Black Else source.BorderThickness = New Thickness(0) End If End Sub End Class