다음을 통해 공유


TaskList Interface

Definition

The TaskList object represents the items in the Task List window in the Visual Studio integrated development environment (IDE).

public interface class TaskList
public interface class TaskList
__interface TaskList
[System.Runtime.InteropServices.Guid("4E4F0569-E16A-4DA1-92DE-10882A4DDD8C")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface TaskList
[System.Runtime.InteropServices.Guid("4E4F0569-E16A-4DA1-92DE-10882A4DDD8C")]
public interface TaskList
[<System.Runtime.InteropServices.Guid("4E4F0569-E16A-4DA1-92DE-10882A4DDD8C")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type TaskList = interface
[<System.Runtime.InteropServices.Guid("4E4F0569-E16A-4DA1-92DE-10882A4DDD8C")>]
type TaskList = interface
Public Interface TaskList
Attributes

Examples

Sub TaskListExample()  
   Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindTaskList)  
   Dim TL As TaskList = win.Object  
   Dim TLItem As TaskItem  

   ' Add a couple of tasks to the Task List.  
   TLItem = TL.TaskItems.Add(" ", " ", "Test task 1.", vsTaskPriority.vsTaskPriorityHigh, vsTaskIcon.vsTaskIconUser, True, , 10, , )  
   TLItem = TL.TaskItems.Add(" ", " ", "Test task 2.", vsTaskPriority.vsTaskPriorityLow, vsTaskIcon.vsTaskIconComment, , 20, , )  

   ' List the total number of task list items after adding the new   
   ' task items.  
   MsgBox("Task Item 1 description: " & TL.TaskItems.Item(2).Description)  
   MsgBox("Total number of task items: " & TL.TaskItems.Count)  

   ' Remove the second task item. The items list in reverse numeric order.  
   MsgBox("Deleting the second task item")  
   TL.TaskItems.Item(1).Delete()  
   MsgBox("Total number of task items: " & TL.TaskItems.Count)  
End Sub  

Remarks

There is only one TaskList object in the IDE.

Properties

DefaultCommentToken

Gets the default string for adding tasks to the Task List window.

DTE

Gets the top-level extensibility object.

Parent

Gets the immediate parent object of a TaskList object.

SelectedItems

Gets a collection of all of the items currently selected in the Task List.

TaskItems

Gets a collection of all tasks currently in the Task List window in the indicated categories.

Applies to