共用方式為


TaskItem.Checked 屬性

設定或取得 [工作清單] 視窗中的工作項目在核取方塊欄位中是否具備核取符號。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

'宣告
Property Checked As Boolean
bool Checked { get; set; }
property bool Checked {
    bool get ();
    void set (bool value);
}
abstract Checked : bool with get, set
function get Checked () : boolean
function set Checked (value : boolean)

屬性值

型別:System.Boolean
布林值,如果工作項目為核取,則會表示為 true,否則為 false。

範例

[Visual Basic]

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
   MsgBox(msg)
End Sub

.NET Framework 安全性

請參閱

參考

TaskItem 介面

EnvDTE 命名空間