Locale-specific ComboBox
Navigate.cs
// 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.
// 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;

using ESRI.ArcGISExplorer;
using ESRI.ArcGISExplorer.Application;
using ESRI.ArcGISExplorer.Mapping;
using ESRI.ArcGISExplorer.Geometry;
using ESRI.ArcGISExplorer.Data;
using ESRI.ArcGISExplorer.Threading;

namespace LocaleSpecificCS
{
    public class NavigateCombo : ESRI.ArcGISExplorer.Application.ComboBox
    {
        MapDisplay disp = null;
        ComboItem fly = null;
        ComboItem go = null;

        public NavigateCombo()
        {
            disp = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay;

            fly = new ComboItem(Properties.Resources.Fly);
            this.Items.Add(fly);

            go = new ComboItem(Properties.Resources.Go);
            this.Items.Add(go);

            if (disp.AnimateMovement == true)
            {
                this.SelectedItem = fly;
            }
            else
            {
                this.SelectedItem = go;
            }
        }

        public override void OnSelectionChange(ComboItem item)
        {
            if (item == fly)
            {
                disp.AnimateMovement = true;
            }
            else if (item == go)
            {
                disp.AnimateMovement = false;
            }
        }

    }
}