ArcGIS Runtime SDK for .NET Samples

Find a route

Route and driving directions
Loading

Code

<UserControl
    x:Class="ArcGISRuntime.UWP.Samples.FindRoute.FindRoute"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls">
    <Grid>
        <esriUI:MapView x:Name="MyMapView" />
        <Border Background="#D8F5F5F5" BorderBrush="Black" BorderThickness="1"
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Margin="30" Padding="20" Width="375">
            <StackPanel>
                <TextBlock Text="Route directions:"
                           Margin="0,0,0,5"
                           FontWeight="SemiBold" />
                <ListView x:Name="DirectionsListBox"
                          HorizontalAlignment="Stretch"
                          Height="300">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding DirectionText}" TextWrapping="Wrap" />
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
                <Button Content="Solve route"
                        HorizontalAlignment="Stretch"
                        Margin="0,5"
                        Click="SolveRouteClick" />
                <Button Content="Reset"
                        HorizontalAlignment="Stretch"
                        Click="ResetClick" />
            </StackPanel>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code