private LazyItemViewModel CreateLazyItemViewModel()
        {
            var result = new LazyItemViewModel(_imageSourceFactory, this);

            if (ChildrenCount != 0)
            {
                result.Text = string.Format("(Click to expand {0:n0} additional items...)",
                                            ChildrenCount - HardCodedSettings.MaxExpandedTreeViewItemCount);
            }
            result.Selected += () => {
                var node = _children.ExpandLazyNode();
                node.IsSelected = true;
            };
            return(result);
        }
        private LazyItemViewModel CreateLazyItemViewModel()
        {
            var result = new LazyItemViewModel(null, null);

            if (_activeRootNodes.Count > HardCodedSettings.MaxExpandedTreeViewItemCount)
            {
                result.Text = string.Format("(Click to expand {0:n0} additional items...)",
                                            _activeRootNodes.Count - HardCodedSettings.MaxExpandedTreeViewItemCount);
            }
            result.Expand += () => {
                var node = _rootNodes.ExpandLazyNode();
                node.IsSelected = true;
            };
            return(result);
        }
 private LazyItemViewModel CreateLazyItemViewModel() {
   var result = new LazyItemViewModel(_imageSourceFactory, this);
   if (ChildrenCount != 0)
     result.Text = string.Format("(Click to expand {0:n0} additional items...)",
                                 ChildrenCount - HardCodedSettings.MaxExpandedTreeViewItemCount);
   result.Selected += () => {
     var node = _children.ExpandLazyNode();
     node.IsSelected = true;
   };
   return result;
 }