Some of my end users have touch screens, and others have PCs. On touch screens, PreviewMouseUp/Down
fire along with the touch event handlers, causing duplicate behavior (functions written in PreviewMousUp/Down get executed twice).
So my sample Button XAML:
<Button x:Name="Whatever" Background="Transparent" MouseUp="Whatever_MouseUp" MouseDown="Whatever_MouseDown" TouchUp="Whatever_TouchUp" TouchDown="Whatever_TouchDown">
<StackPanel>
<TextBlock x:Name="WhateverText" Text="Soemthing" FontSize="13"/>
<Image x:Name="WhateverImage" Source="bla/bla/bla"/>
</StackPanel>
</Button>
Why MouseDown
and MouseUp
event handlers are not getting fired on the PC?
If I execute on a touch screen, it works like a charm (Touch event handlers). However, on my PC(VS-2015) it doesn't work at all. Please and thanks