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.