mapbox-xamarin-forms icon indicating copy to clipboard operation
mapbox-xamarin-forms copied to clipboard

Data binding in XAML - ViewModel

Open RogerSchmidlin opened this issue 4 years ago • 0 comments

I am trying to load the map data dynamically from my viewmodel on ViewAppearing. <mapbox:MapView x:Name="map" MapStyle="DARK" ZoomLevel="{Binding ZoomLevel, Mode=TwoWay}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" /> The data binding only works on initialising the value in the constructor but not anytime after. I would like to update the map data dynamically, because its content changes over time. In your example you show data binding but I can't get it to work. Any ideas? Also I cannot set the Map Style in XAML that has no effect at all. It looks like I have to do all that in code behind.

RogerSchmidlin avatar Mar 18 '20 05:03 RogerSchmidlin