ArcGIS Runtime SDK for .NET Samples

Distance measurement analysis

Measure distance in a scene view
Loading

Code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"             
             xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"
             x:Class="ArcGISRuntime.Samples.DistanceMeasurement.DistanceMeasurement">
  <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <!-- Labels -->
        <Label x:Name="HelpLabel"
                       TextColor="Red"
                       Text="Tap to update the measurement."
                       Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" />
        <Label Text="Direct" 
                       Grid.Row="1" Grid.Column="0" />
        <Label Text="Horizontal"
                       Grid.Row="2" Grid.Column="0" />
        <Label Text="Vertical"
                       Grid.Row="3" Grid.Column="0" />

        <!-- Controls -->
        <Label x:Name="DirectMeasureLabel"
                       Grid.Row="1" Grid.Column="1" />
        <Label x:Name="HorizontalMeasureLabel"
                       Grid.Row="2" Grid.Column="1" />
        <Label x:Name="VerticalMeasureLabel"
                       Grid.Row="3" Grid.Column="1" />
        <Picker x:Name="UnitSystemCombo"
                          Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2"
                          Margin="0,5,0,5"
                          />
        <esriUI:SceneView x:Name="MySceneView" 
                          Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" />
  </Grid>
</ContentPage>


In this topic
  1. Code