Click here to Skip to main content
15,886,067 members
Articles / Desktop Programming / WPF

Tuning Up The TreeView - Part 2

Rate me:
Please Sign up or sign in to vote.
4.75/5 (7 votes)
2 Mar 2010CPOL11 min read 41.9K   1.6K   40  
Improved TreeView sorting, filtering, selection, and efficiency.
using System;

namespace DirectoryTree.VM
{
   // Data Context container of Drives
   public class Computer
   {
      private TreeNodeCol drives = new TreeNodeCol();
      public TreeNodeCol Drives { get { return drives; } }

      public Computer(int nDrives)
      {
         for (int i=0; i<nDrives; i++)
            drives.Add(DirectoryTree.Test.DataFactory.CreateDrive());
      }

      public override string ToString() { return "MyComputer"; }
   }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Lee has worked on user interfaces, graphics, computational geometry, memory management, threading, and assorted applications in C#, Java, C++, and C. He started out programming in Fortran on a 128 Kb PDP/11, which only proves that he's old, not smart. Lee also writes about chronic illness and his love of animals; his auto racing related articles are here.

Comments and Discussions