AnsweredAssumed Answered

Layer.IsVisible binding not working

Question asked by jan.palas on Aug 22, 2017
Latest reply on Aug 23, 2017 by mnielsen-esristaff

Is it possible to set (working) binding on Layer.IsVisible property? As far as I tried, I could not manage to make it work. 

 

<esri:MapView>
    <esri:Map>
         <esri:WmtsLayer ServiceUri="http://geoportal.cuzk.cz/WMTS_ZM/WMTService.aspx"
                TileMatrixSet="jtsk:epsg:5514"
                IsVisible="{Binding ShowBaseLayer}"/>
    </esri:Map>
</esri:MapView>

 

On my view model, PropertyChanged event is raised properly whenever the ShowBaseLayer property changes. However, the layer is always visible, no matter what the value of ShowBaseLayer property is.

 

Am I missing something here? Is my approach correct? (Binding works properly on the rest of my page, thus there is no problem with setting DataContext/wrong DataContext/etc. here)

 

I am using ArcGIS Runtime 10.2.7 for Desktop.

 

Thanks for any tips,

Jan

Outcomes