ArcObjects Library Reference  

frmPropertyPage

About the Move a graphic along a path in ArcMap Sample

[C#]

frmPropertyPage.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.Animation;

namespace AnimationDeveloperSamples
{
    public partial class frmPropertyPage : Form
    {
        private bool pageDirty;
        IAGAnimationTrack targetTrack;

        public frmPropertyPage()
        {
            InitializeComponent();
            pageDirty = false;
        }
        public void Init(IAGAnimationTrack track)
        {
            targetTrack = track;

            IAGAnimationTrackExtensions trackExtensions = (IAGAnimationTrackExtensions)targetTrack;
            IMapGraphicTrackExtension trackExtension;
            if (trackExtensions.ExtensionCount == 0) //if there is no extension, add one
            {
                trackExtension = new MapGraphicTrackExtension();
                trackExtensions.AddExtension(trackExtension);
            }
            else
            {
                trackExtension = (IMapGraphicTrackExtension)trackExtensions.get_Extension(0);
            }
            this.checkBoxTrace.Checked = trackExtension.ShowTrace;
        }
        public CheckBox CheckBoxShowTrace
        {
            get {
                return checkBoxTrace;
            }
        }
        public bool PageDirty
        {
            get {
                return pageDirty;
            }
        }
        private void checkBoxTrace_Click(object sender, EventArgs e)
        {
            pageDirty = true;
        }

        private void frmPropertyPage_Load(object sender, EventArgs e)
        {
            helpProvider1.SetHelpString(this.checkBoxTrace, "Check to show the trace of the moving graphic in the animation. ");
        }
    }
}
[Visual Basic .NET]

frmPropertyPage.vb

Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Imports ESRI.ArcGIS.Animation

Partial Public Class frmPropertyPage : Inherits Form
    Private bPageDirty As Boolean
    Private targetTrack As IAGAnimationTrack

    Public Sub New()
        InitializeComponent()
        bPageDirty = False
    End Sub
    Public Sub Init(ByVal track As IAGAnimationTrack)
        targetTrack = track

        Dim trackExtensions As IAGAnimationTrackExtensions = CType(targetTrack, IAGAnimationTrackExtensions)
        Dim trackExtension As IMapGraphicTrackExtension
        If trackExtensions.ExtensionCount = 0 Then 'if there is no extension, add one
            trackExtension = New MapGraphicTrackExtension()
            trackExtensions.AddExtension(trackExtension)
        Else
            trackExtension = CType(trackExtensions.Extension(0), IMapGraphicTrackExtension)
        End If
        Me.checkBoxTrace.Checked = trackExtension.ShowTrace
    End Sub
    Public ReadOnly Property CheckBoxShowTrace() As CheckBox
        Get
            Return checkBoxTrace
        End Get
    End Property
    Public ReadOnly Property PageDirty() As Boolean
        Get
            Return bPageDirty
        End Get
    End Property
    Private Sub checkBoxTrace_Click(ByVal sender As Object, ByVal e As EventArgs) Handles checkBoxTrace.Click
        bPageDirty = True
    End Sub

    Private Sub frmPropertyPage_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
        helpProvider1.SetHelpString(Me.checkBoxTrace, "Check to show the trace of the moving graphic in the animation. ")
    End Sub
End Class