Function GetCurrentSecondaryPortalContentType() As CatalogSecondaryPortalContentType
CatalogSecondaryPortalContentType GetCurrentSecondaryPortalContentType()
Function GetCurrentSecondaryPortalContentType() As CatalogSecondaryPortalContentType
CatalogSecondaryPortalContentType GetCurrentSecondaryPortalContentType()
{
//Gets the Catalog pane
var catalogWindow = Project.GetCatalogPane() as ICatalogWindow;
var catContentType = catalogWindow.GetCurrentContentType();
//Is Portal the content type?
if (catContentType == CatalogContentType.Portal)
{
//check what is the portal content type being shown...
var secondaryContentType =
catalogWindow.GetCurrentSecondaryPortalContentType();
//TODO use secondary portal content type...
}
}
{
//Gets the Catalog pane
var catalogWindow = Project.GetCatalogPane() as ICatalogWindow;
if (!catalogWindow.IsActiveWindow)
{
//catalog dockpane must be the active window
}
var catContentType = catalogWindow.GetCurrentContentType();
//Is portal content being shown?
if (catContentType == CatalogContentType.Portal)
{
//check what is the portal content type being shown...
var portalContentType = (int)catalogWindow.GetCurrentSecondaryPortalContentType();
//advance to the next tab
portalContentType++;
if (portalContentType > (int)CatalogSecondaryPortalContentType.LivingAtlas)
portalContentType = (int)CatalogSecondaryPortalContentType.UserContent;
//set the secondary portal content type
//Must be on the UI - no QueuedTask!
catalogWindow.SetSecondaryPortalContentTypeAsync(
(CatalogSecondaryPortalContentType)portalContentType);
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)