I have a UWP app that uses the MapControl to create routes. I then capture the bitmap of the control in order to print out the map. I added dynamic sizing to the dialog so that I could easily capture only the route portion of the map. (in order to print full screen on paper).
When I change the target OS to the CreatorsUpdate, the map control and the dialog behave differently. The control seems to drive the size of the dialog instead of the other way around. And, I cannot seem to change the values of the MapControl size dynamically.
Here is the original XAML which is not working when targeting CreatorsUpdate.
MinHeight="{Binding GridHeight,Mode=TwoWay}"
MinWidth="{Binding GridWidth,Mode=TwoWay}"
Background="LightGray"
DataContext="{Binding RouteDialogViewModel,Source={StaticResource ViewModelLocator}}">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<maps:MapControl x:Name="MyMap"/>
<Button Content="{Binding Orientation}" Height="40" Click="ToggleButton_Click" VerticalAlignment="Top" HorizontalAlignment="Left"/>
<Button Content="Print" Height="40" Click="PrintMap_Click" VerticalAlignment="Top" HorizontalAlignment="Right"/>
</Grid>
When I move the binding of the Min and Max Height to the control itself, it does not react (change size) when I change the values.
Thanks for any insights.