This documentation is archived and is not being maintained.

ListView.TileSize Property

Gets or sets the size of the tiles shown in tile view.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public Size TileSize { get; set; }

Property Value

Type: System.Drawing.Size
A Size that contains the new tile size.

This property controls the size of tiles when the View property is set to View.Tile. Setting this property is useful to prevent line-wrapping when subitem text is too long to be displayed on a single line.

The following code example demonstrates how to use the ListView tiling feature. In the example, the tile view displays items that represent books. Each item is shown as a tile containing an icon of a book, the title, the author, and the publication year. For the example code to work, you must include an icon file named Book.ico in the same directory as the example. To see the tile view without icons, comment out the lines relating to the ImageList object.

using System;
using System.Drawing;
using System.Windows.Forms;

public class ListViewTilingExample : Form
    private ImageList myImageList;

    public ListViewTilingExample()
        // Initialize myListView.
        ListView myListView = new ListView();
        myListView.Dock = DockStyle.Fill;
        myListView.View = View.Tile;

        // Initialize the tile size.
        myListView.TileSize = new Size(400, 45);

        // Initialize the item icons.
        myImageList = new ImageList();
        using (Icon myIcon = new Icon("book.ico"))
        myImageList.ImageSize = new Size(32, 32);
        myListView.LargeImageList = myImageList;

        // Add column headers so the subitems will appear.
        myListView.Columns.AddRange(new ColumnHeader[] 
            {new ColumnHeader(), new ColumnHeader(), new ColumnHeader()});

        // Create items and add them to myListView.
        ListViewItem item0 = new ListViewItem( new string[] 
            {"Programming Windows", 
            "Petzold, Charles", 
            "1998"}, 0 );
        ListViewItem item1 = new ListViewItem( new string[] 
            {"Code: The Hidden Language of Computer Hardware and Software", 
            "Petzold, Charles", 
            "2000"}, 0 );
        ListViewItem item2 = new ListViewItem( new string[] 
            {"Programming Windows with C#", 
            "Petzold, Charles", 
            "2001"}, 0 );
        ListViewItem item3 = new ListViewItem( new string[] 
            {"Coding Techniques for Microsoft Visual Basic .NET", 
            "Connell, John", 
            "2001"}, 0 );
        ListViewItem item4 = new ListViewItem( new string[] 
            {"C# for Java Developers", 
            "Jones, Allen & Freeman, Adam", 
            "2002"}, 0 );
        ListViewItem item5 = new ListViewItem( new string[] 
            {"Microsoft .NET XML Web Services Step by Step", 
            "Jones, Allen & Freeman, Adam", 
            "2002"}, 0 );
            new ListViewItem[] {item0, item1, item2, item3, item4, item5});

        // Initialize the form. 
        this.Size = new System.Drawing.Size(430, 330);
        this.Text = "ListView Tiling Example";

    // Clean up any resources being used.         
    protected override void Dispose(bool disposing)
        if (disposing)

    static void Main() 
        Application.Run(new ListViewTilingExample());


Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0