ArcGIS Runtime SDK for .NET Samples

Animate 3D Graphic

Animate 3d graphic in a scene view

Loading

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.Animate3DGraphic.Animate3DGraphic"
             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"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style TargetType="Button">
            <Setter Property="Margin" Value="5,0,5,0" />
            <Setter Property="Height" Value="25" />
            <Setter Property="Padding" Value="5,0,5,0" />
        </Style>
        <Style TargetType="Slider">
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
        <Style TargetType="Label">
            <Setter Property="FontWeight" Value="Bold" />
        </Style>
        <Style TargetType="TextBlock">
            <Setter Property="Margin" Value="5,0,5,0" />
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="150" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="150" />
        </Grid.ColumnDefinitions>
        <esri:SceneView x:Name="MySceneView"
                        Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Grid.RowSpan="3"
                        AtmosphereEffect="Realistic" />
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                    Orientation="Horizontal" Margin="5">
            <ComboBox x:Name="MissionSelectionBox"
                      VerticalAlignment="Top" Height="25" Width="100" />
            <Button Content="Pause"
                    VerticalAlignment="Top" Height="25" Width="50"
                    Click="MissionPlayPlauseClick" />
            <TextBlock Text="Progress" Margin="5" />
            <Slider x:Name="MissionProgressBar"
                    VerticalAlignment="Top" Margin="5" Width="100" Height="25"
                    Minimum="0" Maximum="1"
                    ValueChanged="MissionProgressOnSeek" />
            <Button Content="Don't follow"
                    VerticalAlignment="Top" Height="25" Width="100"
                    Click="ToggleFollowPlane" />
        </StackPanel>
        <Border CornerRadius="5"
                Grid.Row="0" Grid.Column="2" Margin="5">
            <Border.Background>
                <SolidColorBrush Color="White" Opacity="0.7" />
            </Border.Background>
            <StackPanel Margin="5">
                <Label Content="Play speed" />
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="40" />
                    </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, StringFormat=N2}"
                               Grid.Column="1" />
                </Grid>
                <Separator />
                <Label FontSize="16" Content="Stats" />
                <Label Content="Altitude:" />
                <TextBlock x:Name="AltitudeLabel" />
                <Label Content="Heading:" />
                <TextBlock x:Name="HeadingLabel" />
                <Label Content="Pitch:" />
                <TextBlock x:Name="PitchLabel" />
                <Label Content="Roll:" />
                <TextBlock x:Name="RollLabel" />
            </StackPanel>
        </Border>
        <esri:MapView x:Name="InsetMapView"
                      Grid.Row="2" Grid.Column="0" Margin="5,0,0,25"
                      IsAttributionTextVisible="False" />
    </Grid>
</UserControl>


In this topic
  1. Code