I have code that creates new Data Frames, using IMaps.Create() and when you right click->Properties on the new Data Frames in ArcMap TOC, it never opens up the Properties window?! Anyone know whats going on here, have I missed something in the code?
The code is fairly basic:
internal static void AddNewMap(string mapName)
{
//Makes the new map the active focus map too.
IMxDocument mxd = ArcMap.Document;
IMaps maps = mxd.Maps;
IMap map = null;
if (maps.Count == 1 && maps.Item[0].Name != "Foo Name")
{
map = maps.Item[0];
}
else
{
map = maps.Create();
maps.Add(map);
}
map.Name = mapName;
IActiveView pActiveView = ArcMap.Document.ActiveView;
if (pActiveView is IPageLayout)
ArcMap.Document.ActiveView.FocusMap = map;
else
ArcMap.Document.ActiveView = (IActiveView)map;
ArcMap.Document.UpdateContents();
}