I want to label the features of feature layers in my TOC. This has to be using the CommandBar and CommandItem. How should I go about it? Some heads up will be appreciated
If you already have a tool on a toolbar that displays the labels you would use the following code to find the command and just call ICommandItem.Execute to execute the command.
I don't recall any out-of-the-box commands that display labels. In my code I display the labels using IGeoFeatureLayer.DisplayAnnotation. This is mentioned starting on the following page.
Working with labels and annotation (ArcObjects)
Thank you for the quick response @Freddie. I was able to complete the action using the DisplayAnnotation method, but I wanted to follow the commandItem methods for this task.
I will try out the code in the link you mentioned. Thanks again!
Retrieving data ...