Take Screenshot

This sample demonstrates how you can take screenshot of a map. Click 'take screenshot' button to take a screenshot of the visible area of the map. Created image is shown in the sample after creation.

Take screenshot

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.TakeScreenshot.TakeScreenshot"
             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" 
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
             mc:Ignorable="d">
    <Grid>
        <esri:MapView x:Name="MyMapView" />
        <Border
                Background="White" BorderBrush="Black" BorderThickness="1"
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Margin="30" Padding="20" Width="375">
            <StackPanel>
                <Button x:Name="ScreenshotButton" Content="Take screenshot" Click="OnScreenshotButtonClicked"/>
                <Image x:Name="imageView" Margin="0,5"></Image>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code