ArcObjects Library Reference (Controls)  

IToolbarItem.UID Property

The UID of the command used by the item, which may be empty.

ERROR: Syntax information about IToolbarItem.UID may not be in D:\ArcGIS\DotNet\ESRI.ArcGIS.Controls.dll

[C++]
HRESULT get_UID(
  IUID** ppUID
);
[C++]

Parameters

ppUID [out, retval]

  ppUID is a parameter of type IUID

Product Availability

Available with ArcGIS Engine.

Description

Returns the UID of the Command used by the item. The method will return Nothing if the command has been added to the CommandPool using either the AddCommand or IToolbarControl::AddItem methods without a UID or ProgID supplied.

The UID objects are managed in association with objects implementing ICommand by the IToolbarControl::CommandPool.

[C#]
IUID uID = axToolbarControl1.GetItem(0).UID;
System.Windows.Forms.MessageBox.Show(uID.Value.ToString());
[Visual Basic .NET]
Dim pUID As New UIDClass
pUID = AxToolbarControl1.GetItem(0).UID
System.Windows.Forms.MessageBox.Show(pUID.Value)

See Also

IToolbarItem Interface