VintaSoft Imaging .NET SDK v8.7
Vintasoft.Imaging.UI Namespace / AnimatedImageViewer Class
Members Example



In This Topic
    AnimatedImageViewer Class
    In This Topic
    Viewer control for displaying the animation from images.
    Object Model
    AnimatedImageViewer ClassIObjectClipboard InterfaceThumbnailAppearance ClassVintasoftImage ClassThumbnailAppearance ClassDecodingSettings ClassRenderingSettings ClassImageCollection ClassVintasoftImage ClassImageViewerBase ClassPaddingF StructureImageRenderingRequirements ClassImageViewerState ClassVisualTool Class
    Syntax
    'Declaration
     
    Public Class AnimatedImageViewer 
       Inherits ImageViewer
    public class AnimatedImageViewer : ImageViewer 
    public __gc class AnimatedImageViewer : public ImageViewer 
    public ref class AnimatedImageViewer : public ImageViewer 
    Example
    This example shows how to show animation from GIF image file in AnimatedImageViewer.
    ''' <summary>
    ''' Shows animation in animated image viewer.
    ''' </summary>
    ''' <param name="viewer">An animated image viewer.</param>
    ''' <param name="filename">The filename.</param>
    Private Sub StartAnimation(viewer As Vintasoft.Imaging.UI.AnimatedImageViewer, filename As String)
    	' if image collection of the image viewer is not empty
    	If viewer.Images.Count > 0 Then
    		' clear the image collection of the image viewer 
    		viewer.Images.ClearAndDisposeItems()
    	End If
                
    	' open the file
    	viewer.Images.Add(filename)
    	' start the animation
    	viewer.Animation = True
    End Sub
    /// <summary>
    /// Shows animation in animated image viewer.
    /// </summary>
    /// <param name="viewer">An animated image viewer.</param>
    /// <param name="filename">The filename.</param>
    private void StartAnimation(Vintasoft.Imaging.UI.AnimatedImageViewer viewer, string filename)
    {
        // if image collection of the image viewer is not empty
        if (viewer.Images.Count > 0)
        {
            // clear the image collection of the image viewer 
            viewer.Images.ClearAndDisposeItems();
        }
                
        // open the file
        viewer.Images.Add(filename);
        // start the animation
        viewer.Animation = true;
    }
    Inheritance Hierarchy

    System.Object
       System.MarshalByRefObject
          System.ComponentModel.Component
             System.Windows.Forms.Control
                System.Windows.Forms.ScrollableControl
                   Vintasoft.Imaging.UI.ImageViewerBase
                      Vintasoft.Imaging.UI.ImageViewer
                         Vintasoft.Imaging.UI.AnimatedImageViewer

    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also