This documentation is archived and is not being maintained.

Checked Property

Visual Studio .NET 2003

Sets or returns whether a task item in the Task List window has a check in the check box column.

[Visual Basic .NET]
Public Property Checked() As Boolean
[Visual Basic 6]
Property Get Checked() As Boolean
Property Let Checked( _
   ByVal NewValue As Boolean _
HRESULT __stdcall get_Checked(
   /* [out, retval] */ VARIANT_BOOL* retVal
HRESULT __stdcall put_Checked(
   /* [in] */ VARIANT_BOOL NewValue
public bool Checked {get; set;}
[JScript .NET]
public function get Checked() : Boolean
public function set Checked(
   NewValue : Boolean


Indicates whether the new task item is checked.

Return Value

True if the task item is checked, False if not.


Sub CheckedExample1()
   ' Before running, add a task to the Task List.
   Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindTaskList)
   Dim TL As TaskList = win.Object
   Dim TLItem As TaskItem = TL.TaskItems.Item(1)
   Dim msg As String

   'List properties of the Task Item.
   msg = "TaskItem Category property value: " & TLItem.Category & vbCr
   msg = msg & "TaskItem SubCategory property value: " & TLItem.SubCategory & vbCr
   msg = msg & "TaskItem Checked property value: " & TLItem.Checked & vbCr
   msg = msg & "TaskItem Displayed property value: " & TLItem.Displayed & vbCr
   msg = msg & "TaskItem IsSettable property value: " & TLItem.IsSettable(vsTaskListColumn.vsTaskListColumnCheck) & vbCr
   msg = msg & "TaskItem Priority property value: " & TLItem.Priority & vbCr
End Sub

See Also

Applies To: TaskItem Object