ArcGIS Runtime SDK for .NET Samples

Manage bookmarks

Manage bookmarks sample
Loading

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.ManageBookmarks.ManageBookmarks"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
    <Grid>
        <esri:MapView x:Name="MyMapView" />
        <Border
            Background="White" BorderBrush="Black" BorderThickness="1"
            HorizontalAlignment="Right" VerticalAlignment="Top"
            Margin="30" Padding="20" Width="375">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="180" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock Text="Tap 'Add' to create a new bookmark for the current extent."
                           Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3"
                           Margin="5"
                           TextAlignment="Center" FontWeight="SemiBold" />
                <TextBlock Text="Bookmarks:"
                           Grid.Row="1" Grid.Column="0"
                           VerticalAlignment="Center"
                           Margin="5" />
                <ComboBox x:Name="BookmarkChooser"
                          Grid.Row="1" Grid.Column="1"
                          DisplayMemberPath="Name"
                          Width="160" Margin="5"
                          SelectionChanged="OnBookmarkChooserSelectionChanged" />
                <Button x:Name="ButtonAddBookmark"
                        Grid.Row="1" Grid.Column="2"
                        Margin="5" Padding="5,0,5,0"
                        Content="Add"
                        Click="ButtonAddBookmark_Click" />
                <Grid x:Name="BorderAddBookmark"
                      Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3"
                      Visibility="Collapsed">
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="Bookmark Name:"
                               Margin="5"
                               TextWrapping="Wrap"
                               Grid.Row="0" Grid.Column="0" />
                    <TextBox x:Name="TextBoxBookmarkName"
                             Margin="5"
                             Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" />
                    <Button x:Name="ButtonAddDone"
                            Grid.Row="1" Grid.Column="1"
                            Content="OK"
                            Margin="5"
                            Click="ButtonAddDone_Click" />
                    <Button x:Name="ButtonCancel"
                            Grid.Row="1" Grid.Column="2"
                            Margin="5"
                            Content="Cancel"
                            Click="ButtonCancel_Click" />
                </Grid>
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code