Is there a way to set up the code of a measure tool from the cs? The Web sample sets the tool in the xaml, which is not my case.This is what I have and I am not getting it right. My map is inside a ScrollView Object, not sure if this could be an issue.In my xaml: <esri:ToolbarItemCollection>
<esri:ToolbarItem Text="Measure" >
<esri:ToolbarItem.Content>
<Image Source="Measure.png" Stretch="UniformToFill" Margin="10"/>
</esri:ToolbarItem.Content>
</esri:ToolbarItem>
....[other tools]
In my cs:private void myToolbar_ToolbarItemClicked(object sender, SelectedToolbarItemArgs e)
case 0:
StartMeasures();
break;
and then private void StartMeasures()
{
MeasureAction m = new MeasureAction();
m.MeasureMode = MeasureAction.Mode.Polyline;
m.DisplayTotals = true;
m.LineSymbol = (LineSymbol)this.LayoutRoot.Resources["MLineSymbol"];
m.DistanceUnit = DistanceUnit.Kilometers;
m.Attach(this.myMap);
}