I've got an offline (local) map in case the online one fails. I get the local maps and I create a Geodatabase per each file, and then I create a FeatureLayer being the FeatureTable of the featurelayer the geodatabase. Finally I assign the LayerCollection of FeatureLayers to the BaseMap.BaseLayers.
My problem is that I need to adjust the contrast, gamma y brightness as with the WmtsLayer but I cannot. I've tried to cast the FeatureLayer to a Layer and then to ImageAdjustmentLayer but it returns and InvalidCastException.
How can I do this?
Unfortunately, properties : Brightness,Gamma, Contrast are not available on FeatureLayer. The layer type must be of type ImageAdjustmentLayer for these properties to work. FeatureLayer can't be casted to ImageAdjustmentLayer as you have already noted.
If you are not planning to edit these layers then you could create .tpk or vtpk or look at other offlinemap alternatives but whatever you choose layer type would still have to be of type ImageAdjustmentLayer.