private void BingWSLv_LayoutUpdated(object sender, object e) { ViewModel.Where(x => x.IsBlock).ToList().ForEach(item => { var lv = BingWSLv.ContainerFromItem(item) as ListViewItem; lv.IsEnabled = false; }); //BingWSLv.LayoutUpdated -= BingWSLv_LayoutUpdated; //throw new NotImplementedException(); }
private async void BingWSLv_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e) { var item = (sender as TextBlock).DataContext; if (null != item && item is BingWSItem && (item as BingWSItem).IsBlock) { var lv = BingWSLv.ContainerFromItem(item) as ListViewItem; lv.IsHitTestVisible = false; lv.IsEnabled = false; } //ViewModel.Where(x=>x.IsBlock).ToList().ForEach(item => //{ // var lv = BingWSLv.ContainerFromItem(item) as ListViewItem; // lv.IsEnabled = false; //}); }