VintaSoft Imaging .NET SDK v8.6
Vintasoft.Imaging.Wpf.UI Namespace / WpfAnimatedImageViewer Class
Members Example



In This Topic
    WpfAnimatedImageViewer Class
    In This Topic
    Viewer control for displaying the animation from images.
    Object Model
    WpfAnimatedImageViewer ClassVintasoftImage ClassDecodingSettings ClassRenderingSettings ClassImageCollection ClassVintasoftImage ClassWpfImageViewerBase ClassPaddingF StructureImageRenderingRequirements ClassWpfImageViewerState ClassWpfVisualTool Class
    Syntax
    'Declaration
     
    <ToolboxBitmapAttribute()>
    Public Class WpfAnimatedImageViewer 
       Inherits WpfImageViewer
    [ToolboxBitmap()]
    public class WpfAnimatedImageViewer : WpfImageViewer 
    [ToolboxBitmap()]
    public __gc class WpfAnimatedImageViewer : public WpfImageViewer 
    [ToolboxBitmap()]
    public ref class WpfAnimatedImageViewer : public WpfImageViewer 
    Example
    This example shows how to show animation from GIF image file in WpfAnimatedImageViewer.
    ''' <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.Wpf.UI.WpfAnimatedImageViewer, 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.Wpf.UI.WpfAnimatedImageViewer 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.Windows.Threading.DispatcherObject
          System.Windows.DependencyObject
             System.Windows.Media.Visual
                System.Windows.UIElement
                   System.Windows.FrameworkElement
                      System.Windows.Controls.Control
                         System.Windows.Controls.ContentControl
                            System.Windows.Controls.ScrollViewer
                               Vintasoft.Imaging.Wpf.UI.WpfImageViewerBase
                                  Vintasoft.Imaging.Wpf.UI.WpfImageViewer
                                     Vintasoft.Imaging.Wpf.UI.WpfAnimatedImageViewer

    Requirements

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

    See Also