Compartir a través de


Creating Custom Task List Views

You can display a custom task list in the Visual Studio IDE by creating a custom task list view.

Custom views are created entirely in the registry. You specify:

  • The columns.

  • The sort order for the columns.

  • The default sort order.

  • The custom task categories you want displayed in your view.

You can display a single custom category or specify CAT_ALL for multiple categories. You can also create custom text columns that contain any text. However, you cannot sort on custom text columns.

The following tables show the registry format for custom task list views.

In each of the tables, <VS Reg Root> is equal to HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\8.0. The table provides the script entries and additional information about each registry statement.

[<VS Reg Root>\TaskList\Views\<GUID>]

Name

Type

Range

Description

Name

REG_SZ

Text

STRING name of the view or #xxx.

The Name can be a normal string like "My Custom View" or it can be a resource string within a package (#xxx).

Package

REG_SZ

Text

[opt] STRING representation of GUID. This is required if some of your strings are resource strings (#xxx); otherwise, it is ignored.

[<VS Reg Root>\TaskList\Views\<GUID>\Columns\<number>]

Nota

<number> is the one-based order of the columns in the view (where 1 is the leftmost column). Increment <number> for more columns.

Name

Type

Range

Description

Field

REG_DWORD

 

A VSTASKFIELD that is the field of the column.

Width

REG_DWORD

 

Optional. The width of the column in pixels. If the column is not sizeable, this parameter is ignored.

Index

REG_DWORD

 

Optional. If the Field is FLD_CUSTOM, this is the custom column index.

Name

REG_SZ

Text

If Field is FLD_CUSTOM, this is the custom column's name.

Name can also be a resource string in #xxx format.

Filter

REG_SZ or REG_DWORD

 

Either a DWORD with a built-in VSTASKCATEGORY or a STRING representing the GUID of a custom category

[<VS Reg Root>\TaskList\Views\<GUID>\Sort\<number>]

Nota

<number> identifies the sort key. For example, for the primary sort key, <number> equals 1. For the secondary sort key, <number> equals 2, and so on.

Name

Type

Range

Description

Field

REG_DWORD

 

A VSTASKFIELD that is the field of the column.

Index

REG_DWORD

 

Optional. If the Field is FLD_CUSTOM, this is the custom column index.

To implement a custom column, you must implement the IVsTaskItem2 interface on your task items and you must implement the following methods on that interface:

When necessary, the task list queries your IVsTaskItem2 implementation with a custom column number from a specific view, represented by <some guid>. If your task has the appropriate information about that column in that view, you supply information to that column, and specify whether that text is read-only.

See Also

Concepts

UI Support

How to: Create Custom Categories of Task Lists