ArcGIS Runtime SDK for .NET Samples

Buffer

Planar and geodesic buffers
Loading

Code

<UserControl
    x:Class="ArcGISRuntime.UWP.Samples.Buffer.Buffer"
    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 HorizontalAlignment="Right" VerticalAlignment="Top" Margin="30"
                Background="WhiteSmoke" Opacity="0.8">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="10"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3"
                           HorizontalTextAlignment="Center" VerticalAlignment="Center"
                           Foreground="Blue" FontWeight="Bold"
                           Text="Tap to create Planar and Geodesic buffers"
                           Margin="0,10"/>
                <TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
                           HorizontalAlignment="Right" VerticalAlignment="Center"
                           Text="Buffer distance (miles):"/>
                <TextBox x:Name="BufferDistanceMilesTextBox" 
                         Grid.Row="1" Grid.Column="2"
                         TextAlignment="Right"
                         Margin="5,0,20,0"
                         Text="1000"/>
                <Ellipse x:Name="BufferSwatchPlanarEllipse"
                         Grid.Row="3" Grid.Column="0" 
                         Stroke="LightGray"
                         Width="20" Height="20" Margin="10,0"/>
                <TextBlock Grid.Row="3" Grid.Column="1" 
                           HorizontalAlignment="Left" VerticalAlignment="Center"
                           Text="Planar buffers (Web Mercator)"/>
                <Ellipse x:Name="BufferSwatchGeodesicEllipse"
                         Grid.Row="4" Grid.Column="0"
                         Stroke="LightGray"
                         Width="20" Height="20" Margin="10"/>
                <TextBlock Grid.Row="4" Grid.Column="1" 
                           HorizontalAlignment="Left" VerticalAlignment="Center"
                           Text="Geodesic buffers"/>
                <Button x:Name="ClearBuffersButton"
                        Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3"
                        Height="30" Width="160" Margin="0,10"
                        HorizontalAlignment="Center"
                        Content="Clear"
                        Click="ClearBuffersButton_Click"/>
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code