Hi jobin007007,
To achieve this, you would use the Source property in the LegendItem class.
However, the Source property expects an object that implements the ILegendItemSource interface. Unfortunately, the Led Class does not implement this interface; only a select few implement the ILegendItemSource interface, such as the DigitalPlot and XYPlot objects. Essentially jobin007007, you will have to create your own Led Class that implements the ILegendItemSource inteface.
For further detail of the members that an object must implement for the ILegendItemSource interface, please read the help for ILegendItemSource Members under the NI Measurement Studio .NET Class Library help. I however would suggest simply creating a Label and PictureBox pair for your LED, and updating the pair when the LED changes color.
If you are not familiar with Interfaces, I would suggest viewing the link below:
http://www.csharp-station.com/Tutorials/Lesson13.aspx
Nestor