开发者

Bing maps Silverlight Zoom slider

Is there a way to change the style or position of the bing maps silver开发者_Python百科light defualt zoom silder?


yes you can hide the default slider and create your own attaching to the map events to get zoom / pan etc working with your control


I did something similar to this with XAML resembling:

<Grid>
  <!-- MAP -->
  <MapControl:Map x:Name="_map" />
  <!-- ZOOM SLIDER -->
  <Slider Style="{StaticResource MapZoomSliderStyle}"
          HorizontalAlignment="Right" VerticalAlignment="Top"
          Margin="40" Width="18" Height="300"
          Value="{Binding ElementName=_map, Path=ZoomLevel}"
          Minimum="1" Maximum="20"/>
</Grid>

Binding the max/min values is a bit tricky, as they change depending upon where on the map you're viewing, and the map mode (road/aerial). See this question for further discussion.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜