I am converting a SL3 application to SL4 but I am using the 1.2 API and I have noticed some strange behavior in the design mode. Not sure if this is a bug or a limitations. Here are the scenarios:
- Map control NO proxyURL everything looks fine in the designer no error messages.
- Map control with proxyURL everything looks fine in the designer no error messages.
- Map control and navagation control with NO proxyURL and the map disappears in the designer but the application works correctly.
- Map control and navigation control with proxyURL on map layer and the designer throws a parser error. However the application works correctly.
Here is the XAML that I was using:
<Grid x:Name="LayoutRoot" Background="White">
<!-- Scenario 1 -->
<!-- Using map control with NO ProxyURL. No error in design mode. -->
<esri:Map Background="Beige" HorizontalAlignment="Stretch" Margin="10,10,10,10" Name="map1" VerticalAlignment="Stretch">
<esri:ArcGISTiledMapServiceLayer ID="BasemapLayer" Opacity="0.8" Url="http://secure.mapservice" />
</esri:Map>
<!-- Scenario 2 -->
<!-- Using map control with ProxyURL. No error in design mode. -->
<!--<esri:Map Background="Beige" HorizontalAlignment="Stretch" Margin="10,10,10,10" Name="map1" VerticalAlignment="Stretch">
<esri:ArcGISTiledMapServiceLayer ID="BasemapLayer" Opacity="0.8" ProxyURL="../proxy.ashx" Url="http://secure.mapservice" />
</esri:Map>-->
<!-- Scenario 3 -->
<!-- Using map control and navigation control with NO ProxyURL set for the map.
No error in design mode but the map control doesn't display.
However, the application works. -->
<!--<esri:Map Background="Beige" HorizontalAlignment="Stretch" Margin="10,10,10,10" Name="map1" VerticalAlignment="Stretch">
<esri:ArcGISTiledMapServiceLayer ID="BasemapLayer" Opacity="0.8" Url="http://secure.mapservice" />
</esri:Map>
<esriToolkit:Navigation x:Name="nav" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20,20,0,0" Map="{Binding ElementName=map1}" />-->
<!-- Scenario 4 -->
<!-- Using map control and navigation control with ProxyURL set for the map.
Throws parser error in design view. However, the application still works. -->
<!--<esri:Map Background="Beige" HorizontalAlignment="Stretch" Margin="10,10,10,10" Name="map1" VerticalAlignment="Stretch">
<esri:ArcGISTiledMapServiceLayer ID="BasemapLayer" ProxyURL="../proxy.ashx" Opacity="0.8" Url="http://secure.mapservice" />
</esri:Map>
<esriToolkit:Navigation x:Name="nav" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20,20,0,0" Map="{Binding ElementName=map1}" />-->
</Grid>