Sub SetContentTypeAsync( _ ByVal catalogContentType As CatalogContentType _ )
void SetContentTypeAsync( CatalogContentType catalogContentType )
Parameters
- catalogContentType
- The catalog content type to be set
Sub SetContentTypeAsync( _ ByVal catalogContentType As CatalogContentType _ )
void SetContentTypeAsync( CatalogContentType catalogContentType )
| Exception | Description |
|---|---|
| System.InvalidOperationException | The calling thread cannot access this object because a different thread owns it |
{
//Gets the Catalog pane
var catalogWindow = Project.GetCatalogPane() as ICatalogWindow;
if (!catalogWindow.IsActiveWindow)
{
//catalog dockpane must be the active window
}
//Change the content to whatever is the next tab
var catContentType = (int)catalogWindow.GetCurrentContentType();
catContentType++;
if (catContentType > (int)CatalogContentType.Favorites)
catContentType = (int)CatalogContentType.Project;
//Must be on the UI - no QueuedTask!
catalogWindow.SetContentTypeAsync((CatalogContentType)catContentType);
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)