Table of Contents

Class ImageView

Namespace
PluginUI
Assembly
PluginUI.dll

Displays a bitmap, or plays a film-strip animation (VSTGUI CMovieBitmap): logos, backgrounds, animated indicators. The animation runs on the host frame timer only while IsPlaying.

public class ImageView : Control
Inheritance
ImageView
Inherited Members

Constructors

ImageView()

Creates an empty image view.

public ImageView()

ImageView(FilmStrip)

Creates a view playing strip.

public ImageView(FilmStrip strip)

Parameters

strip FilmStrip

ImageView(ImageSource)

Creates a view showing image.

public ImageView(ImageSource image)

Parameters

image ImageSource

Properties

AutoPlay

Starts playing as soon as the view is attached.

public bool AutoPlay { get; set; }

Property Value

bool

DefaultSize

Natural size used when no explicit size is given.

protected override Size DefaultSize { get; }

Property Value

Size

FilmStrip

Film-strip to show or animate.

public FilmStrip? FilmStrip { get; set; }

Property Value

FilmStrip

Fit

Fitting mode.

public ImageFit Fit { get; set; }

Property Value

ImageFit

Frame

Frame shown when not playing (film-strip only).

public int Frame { get; set; }

Property Value

int

FramesPerSecond

Animation speed.

public double FramesPerSecond { get; set; }

Property Value

double

Image

Static image (ignored when FilmStrip is set).

public ImageSource? Image { get; set; }

Property Value

ImageSource

IsPlaying

true while the film-strip animation runs.

public bool IsPlaying { get; set; }

Property Value

bool

Loop

Restarts at the first frame after the last one; otherwise stops on the last frame.

public bool Loop { get; set; }

Property Value

bool

PingPong

Plays back and forth (ping-pong) instead of wrapping.

public bool PingPong { get; set; }

Property Value

bool

Smooth

Smooth (bilinear) scaling; turn off for pixel art.

public bool Smooth { get; set; }

Property Value

bool

Methods

OnAttached()

Called when the element joins a host (subscribe to external events here).

protected override void OnAttached()

OnDetached()

Called when the element leaves its host (unsubscribe here).

protected override void OnDetached()

Play()

Starts the animation.

public void Play()

RenderVector(DrawingContext, Rect, VectorStyle)

Vector rendering of the widget area.

protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)

Parameters

dc DrawingContext
widget Rect
style VectorStyle

Stop()

Stops the animation (keeps the current frame).

public void Stop()

Events

Completed

Raised when a non-looping animation reaches its last frame.

public event Action<ImageView>? Completed

Event Type

Action<ImageView>