Reference to the document's Style Gallery.
[Visual Basic 6.0] Property StyleGallery As IStyleGallery
[Visual Basic .NET] Public ReadOnly Property StyleGallery As IStyleGallery
[C#] public IStyleGallery StyleGallery {get;}
The StyleGallery is an object that manages styles. Styles are a collection of predefined colors, symbols, properties of symbols, and map elements that are used to create maps. Styles help organizations follow a mapping standard and help promote consistency in mapping products.
The StyleGallery is the object underlying the Style Manager window in ArcMap. There is one StyleGallery object per application and it is global. Instantiating a new StyleGallery object really finds the one created by the application.
Public Sub MakeGradientFill()
'Get the StyleGallery
Dim pMxDocument As IMxDocument
Dim pStyleGallery As IStyleGallery
Set pMxDocument = Application.Document
Set pStyleGallery = pMxDocument.StyleGallery
'Because the StyleGallery object is global we could have used:
'Set pStyleGallery = New StyleGallery
'Create StyleGallery Item
Dim pStyleGalleryItem As IStyleGalleryItem
Set pStyleGalleryItem = New StyleGalleryItem
pStyleGalleryItem.Name = "Gradient Fill 1"
pStyleGalleryItem.Category = "Gradient Fills"
'Create the Symbol
Dim pGradientFillSymbol As IGradientFillSymbol
Set pGradientFillSymbol = New GradientFillSymbol
'Add the Symbol Item to the StyleGallery
pStyleGalleryItem.Item = pGradientFillSymbol
pStyleGallery.AddItem pStyleGalleryItem
End Sub