public void SetItemsSource(IEnumerable<ITreeNode> value) {
			this.itemsSource = value;
			this.lazyGrid = new LazyItemsControl<ITreeNode>(this.dataGrid, InitialItemsCount);
			
			// HACK for updating the pins in tooltip
			var observable = new List<ITreeNode>();
			this.itemsSource.ForEach(item => observable.Add(item));
			
			// verify if at the line of the root there's a pin bookmark
			ITextEditor editor;
			var viewContent = WorkbenchSingleton.Workbench.ActiveViewContent;
			ITextEditorProvider provider = viewContent as ITextEditorProvider;
			if (provider != null) {
				editor = provider.TextEditor;
			} else {
				editor = viewContent.GetService(typeof(ITextEditor)) as ITextEditor;
			}
			
			if (editor != null) {
				var pin = BookmarkManager.Bookmarks.Find(
					b => b is PinBookmark &&
					b.Location.Line == logicalPosition.Line &&
					b.FileName == editor.FileName) as PinBookmark;
				
				if (pin != null) {
					observable.ForEach(item => { // TODO: find a way not to use "observable"
					                   	if (pin.ContainsNode(item))
					                   		item.IsPinned = true;
					                   });
				}
			}
			
			var source = new VirtualizingIEnumerable<ITreeNode>(observable);
			lazyGrid.ItemsSource = source;
			this.dataGrid.AddHandler(ScrollViewer.ScrollChangedEvent, new ScrollChangedEventHandler(handleScroll));

			if (this.lazyGrid.ItemsSourceTotalCount != null) {
				// hide up/down buttons if too few items
				btnUp.Visibility = btnDown.Visibility =
					this.lazyGrid.ItemsSourceTotalCount.Value <= VisibleItemsCount ? Visibility.Collapsed : Visibility.Visible;
			}
		}
        public void SetItemsSource(IEnumerable<ITreeNode> value)
        {
            if (value == null)
                return;

            this.itemsSource = value;
            this.lazyGrid = new LazyItemsControl<ITreeNode>(this.dataGrid, InitialItemsCount);

            var source = new VirtualizingIEnumerable<ITreeNode>(value);
            lazyGrid.ItemsSource = source;
            this.dataGrid.AddHandler(ScrollViewer.ScrollChangedEvent, new ScrollChangedEventHandler(handleScroll));

            if (this.lazyGrid.ItemsSourceTotalCount != null) {
                // hide up/down buttons if too few items
                btnUp.Visibility = btnDown.Visibility =
                    this.lazyGrid.ItemsSourceTotalCount.Value <= VisibleItemsCount ? Visibility.Collapsed : Visibility.Visible;
            }
        }