WPF Globe Gallery


Purpose
This sample shows how to host the ArcGIS Engine Globe .NET control with the Windows Presentation Foundation (WPF) classes. It displays various exported thumbnails from globe (.3dd) documents and takes advantage of WPF features such as image translation. All of the WPF elements are defined in Extensible Application Markup Language (XAML) including various templates and styles. The sample also shows how to do the following:
  • Handle license initialization
  • Create and host the control with a WindowsFormsHost
  • Format control styles with XAML
  • Handle WPF and Globe control events
  • Wire up existing tools to WPF controls
  • Release Component Object Model (COM) objects

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Start Visual Studio.
  2. Press F5 to run the sample.
  3. Play the Zoom Slider to view map images in the gallery.
  4. Double-click an image to open the Globe Viewer window, which displays the associated .3dd file in the ArcGIS Globe control. Multiple Globe Viewer windows can be opened simultaneously (it can take longer to open the first map, but should be faster when opening subsequent maps).
  5. Click the tools such as Navigation, Fly, and TargetZoom to view the globe map. When done with the Fly tool, press Esc to release it.
  6. Close the Gallery window.

Additional information

The map must be in Joint Photographic Experts Group (JPEG) image format with a stored thumbnail to display in the gallery. The images in the sample are exported individually from an ArcGlobe application, then edited in Kodak digital camera software to create the stored thumbnail.

app.xaml.cs Perform ArcGIS Engine for Windows binding and license initialization while loading map images.
GalleryWindow.xaml.cs Display globe map images.
GalleryWindow.xaml Declare the layout of the map gallery.
GlobeView.xaml.cs Programmatically host the Globe control and set its properties and events within a WPF window.
GlobeView.xaml Declare the layout of the Globe view.
mapClasses.cs Utility class to help display the maps.
Download the C# files
Application.xaml.vb Perform ArcGIS Engine for Windows binding and license initialization while loading map images.
Gallery.xaml.vb Display globe map images.
Gallery.xaml Declare the layout of the map gallery.
GlobeView.xaml.vb Programmatically host the Globe control and set its properties and events within a WPF window.
GlobeView.xaml Declare the layout of the Globe view.
mapClasses.vb Utility class to help display the maps.
Download the VB.NET files

Download the files for all languages




Additional Requirements
  • .NET Framework 3.5.
  • 3D maps are from free ArcGIS Online standard services.

Development licensing Deployment licensing
Engine Developer Kit Engine: 3D Analyst
ArcGIS for Desktop Basic: 3D Analyst
ArcGIS for Desktop Standard: 3D Analyst
ArcGIS for Desktop Advanced: 3D Analyst