ArcObjects Library Reference  

StyleGallery

About the Creating a toolbar of globe tools Sample

[C#]

StyleGallery.cs

using System.Windows.Forms;
using ESRI.ArcGIS.Display;
using GlobeGraphicsToolbar;
namespace GlobeGraphicsToolbar
{
    public class StyleGallery
    {
        private StyleGalleryForm _styleForm;

        public StyleGallery()
        {
            _styleForm = new StyleGalleryForm();

            InitializeUI();
        }

        private void InitializeUI()
        {
            _styleForm.AutoSize = true;
            _styleForm.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            _styleForm.MaximizeBox = false;
            _styleForm.MinimizeBox = false;
            _styleForm.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
            _styleForm.Text = "Style Gallery";
        }

        public bool IsStyleSelected()
        {
            return _styleForm.ShowDialog() == DialogResult.OK;
        }

        public IStyleGalleryItem StyleGalleryItem
        {
            get
            {
                return _styleForm.StyleGalleryItem;
            }
        }
    }
}
[Visual Basic .NET]

StyleGallery.vb

Imports Microsoft.VisualBasic
Imports System.Windows.Forms
Imports ESRI.ArcGIS.Display
Imports GlobeGraphicsToolbar
Namespace GlobeGraphicsToolbar
	Public Class StyleGallery
		Private _styleForm As StyleGalleryForm

		Public Sub New()
			_styleForm = New StyleGalleryForm()

			InitializeUI()
		End Sub

		Private Sub InitializeUI()
			_styleForm.AutoSize = True
			_styleForm.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
			_styleForm.MaximizeBox = False
			_styleForm.MinimizeBox = False
			_styleForm.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
			_styleForm.Text = "Style Gallery"
		End Sub

		Public Function IsStyleSelected() As Boolean
			Return _styleForm.ShowDialog() = DialogResult.OK
		End Function

		Public ReadOnly Property StyleGalleryItem() As IStyleGalleryItem
			Get
				Return _styleForm.StyleGalleryItem
			End Get
		End Property
	End Class
End Namespace