Select to view content in your preferred language

How to setup an ElementName property for a binding from a different xaml file?

811
1
08-23-2011 07:45 AM
weiliang
Deactivated User
Hi,

I try to use the esri:Editor and put it into a separate file (e.g., editor.xaml) from MainPage.xaml. However, there is a Map property for this esri.Editor that I need to setup the binding. If this esri:Editor is in MainPage.xaml, the code should be
<Grid.Resources>
            <esri:Editor x:Key="MyEditor2" x:Name="EditPolygon" Map="{Binding ElementName=MyMap}"  LayerIDs="Polygon" GeometryServiceUrl="" />  
</Grid.Resources>

Could someone tell me how to bind this MyMap element from MainPage.xaml to the Map property in the editor.xaml?

Thanks,

Wei
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
I think this could be a related thread: http://forums.arcgis.com/threads/15944-How-to-binding-mainpage-s-map. In this case, Element binding need to be replaced. Kindly see attached sample in Post#12.
0 Kudos