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

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

IToolbarItem.Style Property

The style of the item. Displays a combination of text caption and bitmap.

[Visual Basic .NET]
Public Property Style As esriCommandStyles
public esriCommandStyles Style {get; set;}
HRESULT get_Style(
  esriCommandStyles* pVal
HRESULT put_Style(
  esriCommandStyles pVal
pVal [out, retval]

pVal is a parameter of type esriCommandStyles* pVal [in]
pVal is a parameter of type esriCommandStyles

Product Availability

Available with ArcGIS Engine.


Determines the Style of the item on the ToolbarControl, and whether the Caption, or Bitmap or Caption and Bitmap defined within the Command are displayed on the ToolbarControl. By default the Style is esriCommandStyleIconOnly. If the item has a Menu then the Style is fixed to a esriCommandStyleMenuBar Style.

Errors Returned

1049 800a0419: The supplied style is not valid for this Toolbar item

IToolbarItem toolbarItem = axToolbarControl1.GetItem(0);
toolbarItem.Style = esriCommandStyles.esriCommandStyleIconAndText;
//Refresh the changes
axToolbarControl1.Update(0, true);
[Visual Basic .NET]
Dim pToolbarItem As IToolbarItem
pToolbarItem = AxToolbarControl1.GetItem(0)
pToolbarItem.Style = esriCommandStyles.esriCommandStyleIconAndText
'Refresh the changes
AxToolbarControl1.Update(0, True)

See Also

IToolbarItem Interface