ArcGIS Runtime SDK for .NET Samples

Geodatabase transactions

Manage geodatabase edits with transactions
Loading

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.GeodatabaseTransactions.GeodatabaseTransactions"
             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"
                      Grid.Column="1"/>
        <Border Grid.Column="1" 
                Width="600" Height="125" 
                HorizontalAlignment="Center" VerticalAlignment="Top"
                Margin="0,30" 
                CornerRadius="10" BorderBrush="DarkGray" BorderThickness="2"
                Background="LightGray" Opacity="1.0">
            <StackPanel Orientation="Vertical">
                <StackPanel x:Name="EditToolsPanel" 
                            Orientation="Horizontal"
                            Margin="5,10,0,0">
                    <Button x:Name="StartEditingButton" 
                            Content="Start Editing"
                            IsEnabled="False"
                            Width="100" Height="30"
                            Margin="2,0"
                            Click="BeginTransaction"/>
                    <Button x:Name="AddBirdButton" 
                            Content="Add Bird Feature"
                            IsEnabled="False"
                            Width="130" Height="30"
                            Margin="2,0"
                            Click="AddNewFeature"/>
                    <Button x:Name="AddMarineButton" 
                            Content="Add Marine Feature"
                            IsEnabled="False"
                            Width="130" Height="30"
                            Margin="2,0"
                            Click="AddNewFeature"/>
                    <Button x:Name="StopEditingButton"
                            Content="Stop Editing" 
                            IsEnabled="False"
                            Width="100" Height="30"
                            Margin="2,0"
                            Click="StopEditTransaction"/>
                    <Button x:Name="SyncEditsButton"
                            Content="Synchronize" 
                            IsEnabled="True"
                            Width="100" Height="30"
                            Margin="2,0"
                            Click="SynchronizeEdits"/>
                </StackPanel>
                <CheckBox x:Name="RequireTransactionCheckBox"
                          Content="Require a transaction for edits"
                          Margin="8,3"
                          IsChecked="True"
                          Click="RequireTransactionChanged"/>
                <TextBlock x:Name="MessageTextBlock"
                           Text="Generating local geodatabase ..." 
                           Foreground="Blue"
                           Height="40"
                           Margin="5"
                           TextWrapping="Wrap"/>
                <ProgressBar x:Name="LoadingProgressBar" 
                             Height="10"
                             Margin="3"
                             IsIndeterminate="True"
                             Opacity="0.5"/>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code