Hi,I'm creating a series of bookmarks with the names and extents of the bookmarks being bound to an external XML file. I've added the XML as a date source in Expression Blend. I've got a listbox like below:
<ListBox x:Name="Bookmarklistbox" ItemTemplate="{StaticResource bookmarkTemplate}" ItemsSource="{Binding categoryCollection}" >
</ListBox>
I've put the ItemTemplate in the UserControl resources and it looks like this:
<DataTemplate x:Key="bookmarkTemplate">
<StackPanel>
<TextBlock Text="{Binding name}"/>
<Button Name="bookmarkbutton" />
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<esriBehaviors:ZoomToAction TargetName="Map">
<esriBehaviors:ZoomToAction.Geometry>
<esriGeometry:Envelope
XMin="{Binding XMin}" YMin="{Binding YMin}" XMax="{Binding XMax}" YMax="{Binding YMax}"/>
</esriBehaviors:ZoomToAction.Geometry>
</esriBehaviors:ZoomToAction>
</i:EventTrigger>
</i:Interaction.Triggers>
Now, The button content shows up as it should with the correct bookmark name. However, I can't get the Envelope parameters to bind without an error. The error I'm receiving is "Object of System.Windows.Data.Binding cannot be converted to System.Double"If I switch the button content to {Binding XMin}, the content changes to a coordinate...so I know I'm in the right neighborhood. But, I can't seem to figure out how to bind this correctly.Any thoughts?