none
GridViewItem禁止左键选中。 RRS feed

答案

  • Hi,

    你可以定义Gridview的Item Click event, 取消已经选中的item。因为只有左键单击才能触发item click event:

     private void gridview_ItemClick(object sender, ItemClickEventArgs e)
            {
                while (gridview.SelectedItems.Count > 0)
                    gridview.SelectedItems.RemoveAt(0);
            }

    注意您需要将GridView的IsItemClickEnabled属性设置为true 才能出现item click event。

    具体参考以下链接:

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.gridview.aspx

    祝您好运。


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2014年2月17日 3:37
    版主