ArcGIS Runtime SDK for .NET Samples

Change viewpoint

Change viewpoint
Loading

Code

<UserControl
    x:Class="ArcGISRuntime.UWP.Samples.ChangeViewpoint.ChangeViewpoint"
    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 Background="White" BorderBrush="Black" BorderThickness="1"
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Margin="30" Padding="20" Width="375">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <TextBlock Text="Use the buttons to compare the various ways of setting the viewpoint."
                           Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3"
                           Margin="0,0,0,5"
                           TextWrapping="Wrap" FontWeight="SemiBold" />
                <Button Content="Geometry"
                        Grid.Row="1" Grid.Column="0"
                        Margin="0,10,0,0"
                        HorizontalAlignment="Stretch"
                        Click="OnButtonClick" />
                <Button Content="Center and Scale"
                        Grid.Row="1" Grid.Column="1"
                        Margin="5,10,0,0"
                        HorizontalAlignment="Stretch"
                        Click="OnButtonClick"
                        RelativePanel.RightOf="GeomButton" />
                <Button Content="Animate"
                        Grid.Row="1" Grid.Column="2"
                        Margin="5,10,0,0"
                        HorizontalAlignment="Stretch"
                        Click="OnButtonClick"
                        RelativePanel.RightOf="ScaleButton" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code