I am using Get Selected Feature Layer In Contents View by following the sample code from ESRI:
But sometimes there is no layer selected, which cause error in the application.
I tried to find the way to select a layer through arcobjects (as in the following picture), but no luck.
Anybody has any advice on this?
I am using arcmap and arcobjects 10.2.2 and vb.net arcmap add-in.
Thanks in advance.