VintaSoft Imaging .NET SDK 14.1: Документация для .NET разработчика
Vintasoft.Imaging.UI Namespace / AnimatedImageViewer Class
Члены типа Объект Синтаксис Example Иерархия Требования Смотрите также
    Класс AnimatedImageViewer
    Представляет элемент управления средством просмотра для отображения анимации из изображений.
    Объектная модель
    ThumbnailAppearance ThumbnailAppearance VintasoftImage ImageViewerState ImageRenderingRequirements RenderingSettings VisualTool PaddingF DecodingSettings ImageCollection ImageViewerBase IObjectClipboard IObjectClipboard AnimatedImageViewer
    Синтаксис
    'Declaration
    
    <DockingAttribute(Ask)>
    <DesignerAttribute("System.Windows.Forms.Design.ScrollableControlDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")>
    <DefaultPropertyAttribute("Text")>
    <DefaultEventAttribute("Click")>
    <DesignerAttribute("System.Windows.Forms.Design.ControlDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")>
    <DesignerSerializerAttribute("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
    <ToolboxItemFilterAttribute("System.Windows.Forms", Allow)>
    <DesignerCategoryAttribute("Component")>
    Public Class AnimatedImageViewer
       Inherits ImageViewer
    
    
     
    Пример

    Вот C#/VB.NET код, который демонстрирует, как отображать анимацию из файла изображения GIF в 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;
    }
    
    

    Иерархия наследования

    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

    Требования

    Целевые платформы: .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    Смотрите также