←Select platform

FrameChanged Event

Summary

Occurs when the frame changes during animation playback.

Syntax
C#
C++/CLI
public event EventHandler<RasterPictureBoxFrameChangedEventArgs> FrameChanged 
public:  
   event EventHandler<Leadtools::Controls::RasterPictureBoxFrameChangedEventArgs^>^ FrameChanged 
Remarks

This event is raised if the AnimationMode property is changed by either a programmatic modification or user interaction.

Example
C#
using Leadtools; 
using Leadtools.Controls; 
using Leadtools.Codecs; 
using Leadtools.Drawing; 
 
 
public void RasterPictureBox_AnimationModeChanged() 
{ 
   RasterPictureBox viewer = new RasterPictureBox(); 
   viewer.PropertyChanged += viewer_PropertyChanged; 
 
   switch (viewer.AnimationMode) 
   { 
      case RasterPictureBoxAnimationMode.Infinite: 
         viewer.AnimationMode = RasterPictureBoxAnimationMode.UseImageGlobalLoop; 
         break; 
 
      case RasterPictureBoxAnimationMode.UseImageGlobalLoop: 
         viewer.AnimationMode = RasterPictureBoxAnimationMode.Infinite; 
         break; 
   } 
 
   viewer.PlayAnimation(); 
   viewer.PropertyChanged -= viewer_PropertyChanged; 
} 
 
private void viewer_PropertyChanged(object sender, PropertyChangedEventArgs e) 
{ 
   if (e.PropertyName == "AnimationMode") 
   { 
      RasterPictureBox viewer = sender as RasterPictureBox; 
      string s = string.Format("AnimationModeChanged Event: {0}", viewer.AnimationMode.ToString()); 
      Debug.WriteLine(s); 
   } 
} 
Event Data
ParameterTypeDescription
senderobjectThe source of the event.
eRasterPictureBoxFrameChangedEventArgsThe event data.
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.