VintaSoft Imaging .NET SDK 14.0: Документация для .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
    
    
    [Docking(Ask)]
    [Designer("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")]
    [DefaultProperty("Text")]
    [DefaultEvent("Click")]
    [Designer("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")]
    [DesignerSerializer("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")]
    [ToolboxItemFilter("System.Windows.Forms", Allow)]
    [DesignerCategory("Component")]
    public class AnimatedImageViewer : ImageViewer
    
    
    [Docking(Ask)]
    [Designer("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")]
    [DefaultProperty("Text")]
    [DefaultEvent("Click")]
    [Designer("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")]
    [DesignerSerializer("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")]
    [ToolboxItemFilter("System.Windows.Forms", Allow)]
    [DesignerCategory("Component")]
    public __gc class AnimatedImageViewer : public ImageViewer*
    
    
    [Docking(Ask)]
    [Designer("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")]
    [DefaultProperty("Text")]
    [DefaultEvent("Click")]
    [Designer("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")]
    [DesignerSerializer("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")]
    [ToolboxItemFilter("System.Windows.Forms", Allow)]
    [DesignerCategory("Component")]
    public ref class AnimatedImageViewer : public 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 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

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