ArcObjects Library Reference (Controls)  

IToolbarControl2.SaveItems Method

Saves the ToolbarControl items into a stream.

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

[C++]
HRESULT SaveItems(
  IStream* pStream
);
[C++]

Parameters

pStream [in]

  pStream is a parameter of type IStream

Product Availability

Available with ArcGIS Engine.

Description

Persists the any items on the ToolbarControl out as a MemoryBlobStream.

Use the SaveItems method in conjunction with the IBlobStream::SaveToFile method to save any customizations made to the ToolbarControl by a user with the CustomizeDialog. The stream can be saved into a users profile, when an application exits, and the items loaded back into the ToolbarControl when the application is restarted using the LoadItems method.

[C#]
IBlobStream blobStream = new MemoryBlobStreamClass();
IStream stream = (IStream) blobStream;
axToolbarControl1.SaveItems(stream);
blobStream.SaveToFile(@"C:\temp\myCustomToolbarControl");
[Visual Basic .NET]
Dim blobStream As IBlobStream = New MemoryBlobStreamClass
Dim stream As IStream = blobStream
AxToolbarControl1.SaveItems(stream)
blobStream.SaveToFile("C:\temp\myCustomToolbarControl")

See Also

IToolbarControl2 Interface

.NET Snippets

Save ToolbarControl Items to File

.NET Related Topics

How to save ToolbarControl items to a settings file