Select to view content in your preferred language

Zoom Slider Connect to Extent Changed

621
1
09-26-2011 11:43 AM
NigelAlford
Occasional Contributor
I've built a set of map controls outside of the standard ESRI silverlight dev kit.  The last piece to my puzzle is connecting the Extent Changed property to the Zoom Slider.  So when the user zooms in with Zoom In tool, or Zoom out the slider will move to the corresponding Layer Cache level or "Extent".

I'm assuming the "Extent Changed" object should be where I correlate to the corresponding Extent, but I'm unsure.  The Extent is a different value type and does not equate to Slider Cases.

The Slider controls the map through a Switch, each case corresponds the the Slider Value Changed (0-22) We have extra cached imagery levels that will be added to map!
c#
private void ZoomSlider_ValueChanged(object sender, System.Windows.RoutedPropertyChangedEventArgs<double> e)
     {
      int ZSlider = Convert.ToInt32(ZoomSlider.Value);
   ZSliderPos = Convert.ToInt32(ZoomSlider.Value);
   switch (ZSlider)
   {
    case 0:
     MyMap.ZoomToResolution(156543.033928);
     ToolTipService.SetToolTip(ZoomSlider,"1:183819 mi");
     break;

Anybody have thoughts, solutions,etc?
I'm extremely stuck and this is all I need to be done with this beast
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
You can download ESRI.ArcGIS.Client.Toolkit from CodePlex: http://esrisilverlight.codeplex.com/ and look at Navigation.cs. ZoomSlider also makes a conversion from double to resolution.
0 Kudos