First, we will create a Windows Forms control that will be used while displaying inside Visual Studio and other client applications.
The first step would be to create a new class library called CustomTFSClientControls
. This class library can be a .NET 4.0 library (you need to create class libraries that are able to target the Work Item Tracking assembly for each version of Visual Studio you are supporting). Add a reference to Microsoft.TeamFoundation.WorkItemTracking.Client.dll
, Microsoft.TeamFoundation.WorkItemTracking.Controls.dll
, and System.Windows.Forms.dll
. Rename the Class1
file and class to TfsCheckbox
. Now, we need to make our TfsCheckbox
control inherit from System.Windows.Forms.CheckBox
and Microsoft.TeamFoundation.WorkItemTracking.Controls.IWorkItemControl
. Add the following static code to the class:
public TfsCheckbox() { base.ThreeState = false; base.Checked = false; base.CheckedChanged += TfsCheckbox_CheckedChanged...