Hello,
I have an application that first displays a shape file and then displays a tif file with an attached tiff world file into a GdiPlusRasterLayer. Each of these layers display without error when the other is not loaded, but when loading both I get an InvalidOperationException "You can not operate when the file has closed". My attempts to fix this problem by doing the following did not work:
foreach (Overlay overlay in this.Map.Overlays)
{
foreach (Layer layer in ((LayerOverlay)overlay).Layers)
{
layer.Open();
}
}
Thanks.