Hi,
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:
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 !
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:
Code:
IGraphicsContainer graphicsContainer = myPageLayout.ActiveView.GraphicsContainer;
graphicsContainer.Reset();
IElement pElement = graphicsContainer.Next();
while (pElement != null)
{
if (pElement is IMapFrame)
{
// do something
}
}Are there anyone know how to get The MapFrame in this case ?
It's very urgent
Thank you very much !