I am new to WPF and am having a few problems detecting whether the left or right button is pressed during a DragEnter event.
I was expecting a MsgBox to appear but I get nothing.
Thanks for any help
XAML Code
Event Code
I was expecting a MsgBox to appear but I get nothing.
Thanks for any help
XAML Code
VB.NET:
<Grid>
<Button x:Name="btn1" Content="Button" HorizontalAlignment="Left" VerticalAlignment="Top" Width="329" Margin="88,94,0,0" Height="113" AllowDrop="True"/>
</Grid>
Event Code
VB.NET:
Private Sub btn1_DragEnter(sender As Object, e As DragEventArgs) Handles btn1.DragEnter
If Input.Mouse.LeftButton = MouseButtonState.Pressed Then
MsgBox(1)
ElseIf Input.Mouse.RightButton = MouseButtonState.Pressed Then
MsgBox(2)
End If
End Sub