<Image Source="images/zoom.png"> <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <esri:ZoomToAction TargetName="Map"> <esri:ZoomToAction.Geometry> Use some binding here to get the envelope </esri:ZoomToAction.Geometry> </esri:ZoomToAction> </i:EventTrigger> </i:Interaction.Triggers> </Image>
<Button Style="{StaticResource MenuItem}"
Content="Zoom To" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<esri:ZoomToAction
TargetName="MyMap">
<esri:ZoomToAction.Geometry>
<esri:Envelope XMin="-14930991.170" YMin="3611744.037" XMax="-11348896.882" YMax="5340571.181" />
</esri:ZoomToAction.Geometry>
</esri:ZoomToAction>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
<Button Style="{StaticResource MenuItem}"
Content="Zoom To Layer" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<esri:ZoomToLayerAction
LayerID="MyFeatureLayer"
TargetName="MyMap" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
A value of type 'ZoomToAction' cannot be added to a collection or dictionary of type 'TriggerActionCollection'
Do you think I should try removing all the Silverlight stuff and the ArcGIS Silverlight API and reinstall them all?
<esri:Legend x:Name="legendMap" Map="{Binding ElementName=Map}"
LayerItemsMode="Tree"
ShowOnlyVisibleLayers="False"
Refreshed="Legend_Refreshed"
Width="300" Height="300">
<esri:Legend.MapLayerTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox Content="{Binding Label}"
IsChecked="{Binding IsEnabled, Mode=TwoWay}"
IsEnabled="{Binding IsInScaleRange}" >
</CheckBox>
<Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="30" />
</StackPanel>
</DataTemplate>
</esri:Legend.MapLayerTemplate>
<esri:Legend.LayerTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox
IsChecked="{Binding IsEnabled, Mode=TwoWay}"
IsEnabled="{Binding IsInScaleRange}" >
</CheckBox>
<Image Source="images/zoom.png"
ToolTipService.ToolTip="Zoom">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<esri:ZoomToLayerAction
LayerID="{Binding Label}"
TargetName="Map" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Image>
<RadioButton IsChecked="False"
Checked="RadioButton_Checked"
GroupName="grpLayers"
Tag="{Binding Label}"
Content="{Binding Label}" >
</RadioButton>
</StackPanel>
</DataTemplate>
</esri:Legend.LayerTemplate>
</esri:Legend>