This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IT > IToolbarControl2 Interface > IToolbarControl2.SaveItems Method (ArcObjects .NET 10.4 SDK) |
Saves the ToolbarControl items into a stream.
[Visual Basic .NET] Public Sub SaveItems ( _ ByVal pStream As IStream _ )
[C#] public void SaveItems ( IStream pStream );
[C++]
HRESULT SaveItems(
IStream* pStream
);
[C++]
Parameters pStream [in]
pStream is a parameter of type IStream
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.
IBlobStream blobStream=new
MemoryBlobStreamClass();
IStream stream=(IStream) blobStream;
axToolbarControl1.SaveItems(stream);
blobStream.SaveToFile(@"C:\temp\myCustomToolbarControl");
Dim
blobStreamAs
IBlobStream=New
MemoryBlobStreamClassDim
streamAs
IStream=blobStream AxToolbarControl1.SaveItems(stream) blobStream.SaveToFile("C:\temp\myCustomToolbarControl")