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


IToolbarItem.UID Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Controls)  

IToolbarItem.UID Property

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

[Visual Basic .NET]
Public ReadOnly Property UID As UID
[C#]
public UID UID {get;}
[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