private void gridTypeCombo_SelectionChanged(object sender, SelectionChangedEventArgs e) { switch (gridTypeCombo.SelectedIndex) { case 0: MyMapView.MapGrid = null; break; case 1: LatLonMapGrid latLongMapGrid = new LatLonMapGrid(); // Use Geographic positioning for LatLong MapGrid. latLongMapGrid.LabelPosition = MapGridLabelPosition.Geographic; MyMapView.MapGrid = latLongMapGrid; break; case 2: MgrsMapGrid mgrsGrid = new MgrsMapGrid(); // Use Screen-aligned TopLeft position for MGRS MapGrid. mgrsGrid.LabelPosition = MapGridLabelPosition.TopLeft; MyMapView.MapGrid = mgrsGrid; break; case 3: UtmMapGrid utmGrid = new UtmMapGrid(); MyMapView.MapGrid = utmGrid; break; case 4: UsngMapGrid usngMapGrid = new UsngMapGrid(); // Use Screen-aligned AllSides option for USNG MapGrid. usngMapGrid.LabelPosition = MapGridLabelPosition.AllSides; MyMapView.MapGrid = usngMapGrid; break; } }