Hom do I stop the MeasureAction in xaml

654
1
01-17-2014 01:38 AM
Labels (1)
martindevos
New Contributor II
Hi,

I have used the MeasureAction by attaching it to the click event of a button as shown in the SDK sample application.
But once activated, I can't stop it anymore. What is the correct way to do this.

This is the xaml :
                    <Button Content="Measure" Background="{StaticResource PanelGradient}" Foreground="White" Margin="2" >
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="Click">
                                <esri:MeasureAction                                 
                                    AreaUnit="SquareMiles"
                                    DisplayTotals="True"
                                    DistanceUnit="Miles"
                                    MapUnits="Meters"
                                    MeasureMode="Polygon"                                  
                                    FillSymbol="{StaticResource DefaultFillSymbol}"
                                    TargetName="MyMap"/>
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                    </Button>

I have tried to Bind the IsEnabled property of the MeasureAction to a variable in my viewmodel, but that doesn't work.

Kind regards,

Martin
0 Kudos
1 Reply
DavidLednik
Occasional Contributor II
Hi Martin,

Take a look at this post if it helps you:
http://forums.arcgis.com/threads/3696-Measure-Action-in-Code

regards,
David
0 Kudos