Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am getting a problem: I added element (text, line) in a ActiveView.FocusMap of a PageLayoutControl, then all elements are showed in the MapFrame of PageLayoutControl.GraphicsContainer.

If I don't select elements (in MapFrame) I can find the MapFrame by the loop:

IGraphicsContainer graphicsContainer = myPageLayout.ActiveView.GraphicsContainer;
IElement pElement = graphicsContainer.Next();
 while (pElement != null)
                if (pElement is IMapFrame)
                      // do something

But, when one element is selected by using "Select Elements" command, the program won't enter the "if" function (can't find MapFrame).

Are there anyone know how to get The MapFrame in this case ?

It's very urgent

Thank you very much !

share|improve this question
Are there anyone can help ? – taibc Feb 20 '13 at 1:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.