ArcGIS Runtime SDK for .NET Samples

Local Server Services

Note:

In ArcGIS Runtime SDK for .NET, Local Server is only supported for WPF apps.

List services available on the Local Server

Loading

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.LocalServerServices.LocalServerServices"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Button x:Name="LocalServerStartButton"
                Grid.Row="0" Grid.Column="0"
                Content="Start Local Server"
                Margin="5"
                Click="StartServerButtonClicked" />
        <Button x:Name="LocalServerStopButton"
                Grid.Row="0" Grid.Column="1"
                Content="Stop Local Server"
                Margin="5"
                IsEnabled="False"
                Click="StopServerButtonClicked" />
        <ComboBox x:Name="ServiceSelectionCombo"
                  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
                  Margin="5"
                  IsEnabled="False"
                  SelectionChanged="Selector_OnSelectionChanged">
            <ComboBoxItem>Map Service</ComboBoxItem>
            <ComboBoxItem>Feature Service</ComboBoxItem>
            <ComboBoxItem>Geoprocessing Service</ComboBoxItem>
        </ComboBox>
        <Button x:Name="ServiceStartButton"
                Grid.Row="2" Grid.Column="0"
                Content="Start service"
                Margin="5"
                IsEnabled="False"
                Click="StartServiceButtonClicked" />
        <Button x:Name="ServiceStopButton"
                Grid.Row="2" Grid.Column="1"
                Content="Stop service"
                Margin="5"
                IsEnabled="False"
                Click="StopServiceButtonClicked" />
        <TextBox x:Name="StatusTextbox"
                 Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
                 Margin="5" />
        <ListBox x:Name="ServicesListbox"
                 Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2"
                 Margin="5" />
        <Button Content="Navigate to service"
                Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2"
                Margin="5"
                Click="NavigateButtonClicked" />
    </Grid>
</UserControl>


In this topic
  1. Code