My xaml is as follows:
<m:Map CredentialsProvider="XXX" x:Name="mainMap"/>
<BingEditableMapControl:BingMapEditingControl BingMap="mainMap" />
For BingEditableMapControl, the property BingMap is a dependency property takes the control of Map. 开发者_C百科How do i pass the mainMap to the BingMap property through xaml?
Try it like this:-
<m:Map CredentialsProvider="XXX" x:Name="mainMap"/>
<BingEditableMapControl:BingMapEditingControl BingMap="{Binding ElementName=mainMap}" />
Make mainMap a static resource and bind the BingMap property like this
BingMap={StaticResource mainMap}
精彩评论