Hi,
We are using the GridView in our Silverlight apps in some master-details views. To detect selection of an item in the GridView we don't use the "SelectedItem" property, but rather subscribe to a "MouseLeftButtonUp" event on a control in the data template of the grid view cell.
This works perfectly fine when using a mouse, however, when running the app in desktop mode on a windows 8 machine and using touch (i.e. finger) to select an item in the view, it doesn't work properly. What happens is that the actual item in the GridView gets selected (selected color overlay is activated) but no MouseLeftButtonUp (or MouseLeftButtonDown) event is raised. Due to the fact that the data template of the cell is a ContentControl we can't subscribe to a Click event because it doesn't exist on ContentControl.
As far as I read on MSDN, when using touch the touch/tap events are promoted to normal mouse events. This seems to indeed be the case as the item in the grid gets selected. However, no further mouse button events are raised to our code.
Any ideas how to fix this?
Thanks,
Adrian
We are using the GridView in our Silverlight apps in some master-details views. To detect selection of an item in the GridView we don't use the "SelectedItem" property, but rather subscribe to a "MouseLeftButtonUp" event on a control in the data template of the grid view cell.
This works perfectly fine when using a mouse, however, when running the app in desktop mode on a windows 8 machine and using touch (i.e. finger) to select an item in the view, it doesn't work properly. What happens is that the actual item in the GridView gets selected (selected color overlay is activated) but no MouseLeftButtonUp (or MouseLeftButtonDown) event is raised. Due to the fact that the data template of the cell is a ContentControl we can't subscribe to a Click event because it doesn't exist on ContentControl.
As far as I read on MSDN, when using touch the touch/tap events are promoted to normal mouse events. This seems to indeed be the case as the item in the grid gets selected. However, no further mouse button events are raised to our code.
Any ideas how to fix this?
Thanks,
Adrian