Locale-specific ComboBox
Navigate.vb
' Copyright 2010 ESRI
' 
' All rights reserved under the copyright laws of the United States
' and applicable international laws, treaties, and conventions.
' 
' You may freely redistribute and use this sample code, with or
' without modification, provided you include the original copyright
' notice and use restrictions.
' 
' See the use restrictions.
' 

Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text

Imports ESRI.ArcGISExplorer
Imports ESRI.ArcGISExplorer.Application
Imports ESRI.ArcGISExplorer.Mapping
Imports ESRI.ArcGISExplorer.Geometry
Imports ESRI.ArcGISExplorer.Data
Imports ESRI.ArcGISExplorer.Threading

Namespace LocaleSpecificVB
    Public Class NavigateCombo
        Inherits ESRI.ArcGISExplorer.Application.ComboBox
        Private disp As MapDisplay = Nothing
        Private fly As ComboItem = Nothing
        Private go As ComboItem = Nothing

        Public Sub New()
            disp = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay

            fly = New ComboItem(Resources.Fly)
            Me.Items.Add(fly)

            go = New ComboItem(Resources.Go)
            Me.Items.Add(go)

            If disp.AnimateMovement = True Then
                Me.SelectedItem = fly
            Else
                Me.SelectedItem = go
            End If
        End Sub

        Public Overrides Sub OnSelectionChange(ByVal item As ComboItem)
            If item Is fly Then
                disp.AnimateMovement = True
            ElseIf item Is go Then
                disp.AnimateMovement = False
            End If
        End Sub

    End Class
End Namespace