In order to get access to the interface and the main classes of work item, you must reference the assembly Microsoft.TeamFoundation.WorkItemTracking.Controls.dll and Microsoft.TeamFoundation.WorkItemTracking.Client.dll (see Figure 9) and add source code lines: using Microsoft.TeamFoundation.WorkItemTracking.Client; using Microsoft.TeamFoundation.WorkItemTracking.Controls; Figure 9. Links to the assembly interface IWorkItemControl has the following important components (see Table 1) Table 1. The interface elements IWorkItemControl Name Type Description WorkItemDatasource Defines access to the object of the work item. To use this feature, it must lead to the type of WorkItem (definition of the type described in the assembly Microsoft.TeamFoundation.WorkItemTracking.Controls.dll) WorkItemFieldName property property defines the name of the field, which is associated custom item. User control may be associated with a single field or not associated at all. InvalidateDatasource Method This method is used to redraw a custom control. SetSite method passes a pointer to the interface IServiceProvider. Used if you wish to access services VS Services.

Clear method is used to reset the contents of a custom item. Properties property gives access to all the attributes that were set for this user control in the description of the work item. BeforeUpdateDatasource event handler events are called before and after updating WorkItem object values, respectively. When the value that is set in the user element is changed, the form of a work item to perform all the elements (in calling InvalidateDatasource) to update their values. AfterUpdateDatasource event handler ReadOnly Property Specifies read-only access to the user element. Method FlushToDatasource user control is requested to reset the object in the work item.