In our project we have created a custom control with some dependency properties. On the xaml page where we are using this control we are binding the BoundingRectangle property of the Map control to this custom control so we can use these LocationRect object in our custom control.
When we are debugging this, we see that every property in the BoundingRectangle (North, NorthEast etc) all have the same location. If we are checking the properties on the map, than we see that these properties are not all the same. (as expected)
I have attached a change callback to the dependencyproperty, and also there I see all properties have the same value. However, if I bind the Center property than I see it update correctly.
We are binding the property on the custom control like this:
<CustomControls:MiniMap Name="SmallMap" BoundingBox="{Binding ElementName=Map, Path=BoundingRectangle}" />
And this is our dependency property:
public static readonly DependencyProperty BoundingBoxProperty =
DependencyProperty.Register("BoundingBox", typeof(Location), typeof(MiniMap), new UIPropertyMetadata(new LocationRect()));
Anyone knows why the BoundingBox property is not updated when the LocationRectangle is updated on the Map?