I have a WPF TextBox, defined like this:
<TextBox Text="{Binding Path=/Comments}"
Margin="351,193.91,10,36"
x:Name="txtComments"
IsReadOnly="True"
VerticalScrollBarVisibility="Auto"
LostFocus="txtComments_LostFocus"
MouseDoubleClick="txtComments_MouseDoubleClick"
AcceptsReturn="True" />
This works exactly as I would like; however, when the VerticalScrollBars are visible, if you rapidly click the ScrollBar the txtComments_MouseDoubleClick event is fired. Is there any way I can change this behavior or detect that the event was fired by clicking the ScrollBar instead of the body of the textbox?
The main reason I want to do this, is that if you try to scroll down by double clicking the scroll bars the event is fired which causes the application to go down that path, which is very annoying if that is not the users intended action.