I've got two different raster layers in different frames. The frames are at different scales.
It doesn't seem to matter whether the one raster is listed first or second - it always draws on top.
But I'd like to put it on the bottom - of course do this programmatically.
I've fooled around with things like this:
If pAV.IsMapActivated Then
pDoc.ActiveView = aMap
pGC.AddElement(qMapElement, 1)
pGC.AddElement(pMapElement, 3)
Else
pAV.GraphicsContainer.AddElement(qMapElement, 1)
pAV.GraphicsContainer.AddElement(pMapElement, 3)
End If
But they don't seem to help.....
This sort of works....I think I'm on the right track....
Dim pApp As IApplication = My.ArcMap.Application
Dim pDoc As IMxDocument = My.ArcMap.Document
Dim pGC As IGraphicsContainer = pDoc.PageLayout
Dim pMaps As IMaps = pDoc.Maps
Dim gcs As IGraphicsContainerSelect = pGC
pGC.Reset()
Dim pelt As IElement
pelt = pGC.Next
Dim pEltProp As IElementProperties
Do While Not pelt Is Nothing
pEltProp = pelt
MsgBox(pEltProp.Name)
If pEltProp.Name = "Inset" Then
gcs.SelectElement(pelt)
pGC.SendToBack(gcs.SelectedElements)
End If
pelt = pGC.Next
Loop
pDoc.ActiveView.Refresh()
pDoc.UpdateContents()
MsgBox("Done")