ArcGIS Runtime SDK for .NET Samples

Geodatabase transactions

Manage geodatabase edits with transactions
Loading

Code

<UserControl 
    x:Class="ArcGISRuntime.UWP.Samples.GeodatabaseTransactions.GeodatabaseTransactions"
    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 Width="465" Height="150" 
                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="35"
                            Margin="2,0"
                            Click="BeginTransaction"/>
                    <Button x:Name="AddBirdButton" 
                            Content="Add Bird"
                            IsEnabled="False"
                            Width="80" Height="35"
                            Margin="2,0"
                            Click="AddNewFeature"/>
                    <Button x:Name="AddMarineButton" 
                            Content="Add Marine"
                            IsEnabled="False"
                            Width="100" Height="35"
                            Margin="2,0"
                            Click="AddNewFeature"/>
                    <Button x:Name="StopEditingButton"
                            Content="Stop Editing" 
                            IsEnabled="False"
                            Width="100" Height="35"
                            Margin="2,0"
                            Click="StopEditTransaction"/>
                    <Button x:Name="SyncEditsButton"
                            Content="Sync" 
                            IsEnabled="True"
                            Width="50" Height="35"
                            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