I have a problem with a WPF application. Somehow it seems that two (out of several) bindings in my WPF control are not immediately applied. When I look into the visual tree with Snoop, the binding is suddenly applied and everything works fine.
What can be the reason for that?
The XAML code is here:
<Grid Grid.Column="1" Margin="5">
<m:Map ZoomLevel="12" Center="{Binding MapCenter, Mode=TwoWay}">
<m:Map.CredentialsProvider>
<m:ApplicationIdCredentialsProvider ApplicationId="???"/>
</m:Map.CredentialsProvider>
<m:Pushpin Location="{Binding Station.Location, Mode=TwoWay, Converter={StaticResource debugConverter}}" />
</m:Map>
<Button Command="{Binding CenterOnAddressCommand, PresentationTraceSources.TraceLevel=High, Converter={StaticResource debugConverter}}"
Content="Adresse zentrieren" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,20" />
</Grid>
The binding of the Map.Center
property works and the other two bindings (on Pushpin and Button) don't. The Map control is from the Bing Maps WPF Control.
EDIT: After some further investigation I tried removing the binding to the Map.Center property and then everything works (well except centering the map on a certain position). How can this be?
Thanks in advance!