Data binding in XAML - ViewModel
RogerSchmidlin opened this issue · 0 comments
RogerSchmidlin commented
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.