Select to view content in your preferred language

Map Binding Problems

1345
1
10-05-2011 11:21 AM
jonataspovoas
Regular Contributor
Hi,
I'm making a silverlight 4 MVVM solution, using the ArcGIS API for Silverlight, and I'm having troubles binding some map properties.
My code gets the data needed to configurate the map context from a WCF Service, and then populates the map properties via Binding. But when I applied the Bindings, the application has thrown error on the set properties.
<esri:Map Layers="{Binding Mapa.Layers, Mode=TwoWay}"
                      Extent="{Binding Mapa.Extent, Mode=TwoWay}"
                      MinimumResolution="{Binding Mapa.MinimumResolution, Mode=TwoWay}"
                      MaximumResolution="{Binding Mapa.MaximumResolution, Mode=TwoWay}"
                      ZoomFactor="{Binding Mapa.ZoomFactor, Mode=TwoWay}"
                      WrapAround="True"
                      Background="#FFC3D2E5" 
                      IsLogoVisible="False"/>

I tried this on the View Model constructor, but it didn't work.
public AreaDeMapaViewModel()
        {
            servico = new SAEB_AutenticacaoClient();

            Mapa = new Map() { 
                               Extent = new Envelope(-53.0569726287059,
                                                     -31.3741342130775,
                                                     -19.830953377022,
                                                     -5.01880861572849),
                               MaximumResolution = 0.0202254185495574,
                               MinimumResolution = 0.00118973050291514,
                               ZoomFactor = 0.1
                             };
            AcaoConfiguraMapa = new Comando(ConfiguraMapa, (parametro) => true);
        }

Is there anything wrong with my bindings, or does the Map Object created on the view not Support Data Bindings?
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
Map.Extent, MinimumResolution, MaximumResolution are not DependencyProperties and therefore do not support Binding.
0 Kudos