Change gridViewItem's background color after first and second click on it
问题 My point is to change gridViewItem's background color to Blue after first click and to Red after second click on it, then Blue, then Red ... Here is my c# code but it threw an exception 'System.NullReferenceException' on "gvi.Background = new SolidColorBrush(Windows.UI.Colors.Blue);": private void GridViewItem_Click (Object sender, ItemClickEventArgs e) { if(e!=null) { for (int numberOfClick= 1; numberOfClick <100; ++numberOfClick) { GridViewItem gvi = (GridViewItem)NameOf_ItemClick