コード例 #1
0
 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();
 }
コード例 #2
0
        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;
            //});
        }