This document is archived and information here might be outdated.  Recommended version.


IToolbarControl.CommandPool Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IT > IToolbarControl Interface > IToolbarControl.CommandPool Property
ArcGIS Developer Help

IToolbarControl.CommandPool Property

The command pool used by the ToolbarControl to manage command objects. The command pool object maybe shared with other ToolbarControls and ToolbarMenus.

[Visual Basic .NET]
Public Property CommandPool As ICommandPool
[C#]
public ICommandPool CommandPool {get; set;}
[C++]
HRESULT get_CommandPool(
void
);
[C++]
HRESULT putref_CommandPool(
);

Product Availability

Available with ArcGIS Engine.

Description

The CommandPool manages the collection of commands used by the ToolbarControl. The AddItem, AddToolbarDef, Remove and RemoveAll methods all use the CommandPool.

Care must be taken by developers when using the CommandPool to ensure that the ICommandPool::UsageCount of any commands in the collection stay synchronised with the number of item's using the command as the IToolbarItem::Command.

Note that if a new CommandPool is set commands are copied from the original CommandPool into the new one. If the same command exists in the original CommadPool and the new CommandPool, the command in the new CommandPool is used.

Errors Returned

1034 800a040a: The supplied command is invalid
1046 800A0416: The supplied command pool object is invalid

See Also

IToolbarControl Interface