[GIS] How to work with .lyr files in ArcGIS Engine

arcgis-10.0arcgis-enginearcobjectsdevelopment

I want to be able to load .lyr files created in ArcMap and ArcGIS Engine and save any updates in symbology in ArcGIS Engine back to the .lyr file.

What APIs should I use the only method I found so far is MapControl.addLayerFromFile() but the MapControl only let's me load a .lyr file?

I found an API during writing the question so I add an answer myself so it can be a wiki.

Best Answer

There is an Interface ILayerFile in the carto namespace that can be used for this purpose. See also the samples: How to save a layer file, Save a layer file in a MapControl application

Related Question