ArcGIS Runtime SDK for .NET Samples

Animate 3D Graphic

Animate 3d graphic in a scene view

Loading

Code

<UserControl
    x:Class="ArcGISRuntime.UWP.Samples.Animate3DGraphic.Animate3DGraphic"
    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">
    <UserControl.Resources>
        <Style x:Key="LabelStyle" TargetType="TextBlock">
            <Setter Property="FontWeight" Value="SemiBold" />
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="170" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="170" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="175" />
        </Grid.ColumnDefinitions>
        <esriUI:SceneView x:Name="MySceneView"
                          Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Grid.RowSpan="3"
                          AtmosphereEffect="Realistic" />
        <StackPanel Orientation="Horizontal"
                    Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                    Margin="5">
            <ComboBox x:Name="MissionSelectionBox"
                      VerticalAlignment="Top"
                      MinWidth="150" />
            <Button Content="Pause"
                    VerticalAlignment="Top"
                    Margin="5,0,0,0"
                    MinWidth="75"
                    Click="MissionPlayPause_Click" />
            <TextBlock Text="Progress:"
                       Style="{StaticResource LabelStyle}"
                       VerticalAlignment="Top"
                       Margin="5" />
            <Slider x:Name="MissionProgressBar"
                    Width="100" Margin="5,-2,5,0"
                    VerticalAlignment="Top"
                    Minimum="0" Maximum="1" StepFrequency=".01"
                    ValueChanged="MissionProgressOnSeek" />
            <Button Content="Don't follow"
                    VerticalAlignment="Top"
                    MinWidth="100"
                    Margin="5,0,0,0"
                    Click="ToggleFollowPlane" />
        </StackPanel>
        <Border CornerRadius="5"
                Grid.Row="0" Grid.Column="2"
                Margin="5" Padding="5">
            <Border.Background>
                <SolidColorBrush Color="White" Opacity="0.7" />
            </Border.Background>
            <StackPanel Margin="5"
                        Opacity=".9">
                <TextBlock Text="Play speed"
                           Style="{StaticResource LabelStyle}" />
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Slider x:Name="MissionPlaySpeedSlider"
                            Grid.Column="0"
                            Minimum="0.5" Maximum="8" Value="1"
                            ValueChanged="MissionPlaySpeedChanged" />
                    <TextBlock Text="{Binding ElementName=MissionPlaySpeedSlider,Path=Value}"
                               Grid.Column="1" Margin="8" />
                </Grid>
                <TextBlock Text="Stats"
                           FontSize="16" FontWeight="Bold"
                           Margin="0,0,0,10" />
                <TextBlock Text="Altitude:"
                           Style="{StaticResource LabelStyle}" />
                <TextBlock x:Name="AltitudeTextBlock"
                           Margin="5" />
                <TextBlock Text="Heading:"
                           Style="{StaticResource LabelStyle}" />
                <TextBlock x:Name="HeadingTextBlock"
                           Margin="5" />
                <TextBlock Text="Pitch:"
                           Style="{StaticResource LabelStyle}" />
                <TextBlock x:Name="PitchTextBlock"
                           Margin="5" />
                <TextBlock Text="Roll:"
                           Style="{StaticResource LabelStyle}" />
                <TextBlock x:Name="RollTextBlock"
                           Margin="0,5"
                           FontWeight="Normal" />
            </StackPanel>
        </Border>
        <esriUI:MapView x:Name="InsetMapView"
                        BorderBrush="Black" BorderThickness="1"
                        Grid.Row="2" Grid.Column="0"
                        Margin="10,0,0,30"
                        IsAttributionTextVisible="False" />
    </Grid>
</UserControl>


In this topic
  1. Code