Button Walkthrough
ButtonWalkthrough.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 ButtonWalkthroughCS
{
    public class ButtonWalkthrough : ESRI.ArcGISExplorer.Application.Button
    {
        public override void OnClick()
        {
            //Access the ActiveMapDisplay of the Application
            MapDisplay md = Application.ActiveMapDisplay;
            //Click on the map to create a new point
            ESRI.ArcGISExplorer.Geometry.Point trackedPoint = md.TrackPoint();
            //Turn the Point in to a Graphic
            Graphic pointGraphic = new Graphic(trackedPoint);
            //Set the Graphic's symbol to a Red Pushpin
            pointGraphic.Symbol = Symbol.Marker.Pushpin.Red;
            //Add the graphic to the map
            md.Graphics.Add(pointGraphic);

        }
    }
}