The KML viewer I wrote some time ago is doing that.
By right clicking on the legend items, you get a menu allowing to rename, delete, set min/max scale, zoom to full extent.....
You can also create new group layers and reorganize your layers by drag and drop.
The source code is provided in ArcGIS On Line.
Thanks for your help.
one more question ....
How adds in the contextual menu an option to "open attribute table" and link layer associated with?
and also add toolbar with zoom out , print button??