I tried to use MeasureAction and got the following error:
A value of type 'MeasureAction' cannot be added to a collection or dictionary of type 'TriggerActionCollection'.
My code:
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click" x:Uid="eventTrigger">
<esriBehaviors:MeasureAction x:Uid="measureAct"
AreaUnit="SquareMiles"
DisplayTotals="True"
DistanceUnit="Miles"
MapUnits="Meters"
MeasureMode="Polygon"
FillSymbol="{StaticResource DefaultFillSymbol}"
TargetName="MainMap"/>
</i:EventTrigger>
</i:Interaction.Triggers>
Namespaces:
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:esriBehaviors="clr-namespace:ESRI.ArcGIS.Client.Actions;assembly=ESRI.ArcGIS.Client.Behaviors"
At first I referenced namespace esriBehaviors to ESRI.ArcGIS.Client.Behaviors but found out that MeasureAction class is in Client.Actions namespace.
Please help! Thanks!