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
stripFilmStrip
ImageView(ImageSource)
Creates a view showing image.
public ImageView(ImageSource image)
Parameters
imageImageSource
Properties
AutoPlay
Starts playing as soon as the view is attached.
public bool AutoPlay { get; set; }
Property Value
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
FilmStrip
Film-strip to show or animate.
public FilmStrip? FilmStrip { get; set; }
Property Value
Fit
Fitting mode.
public ImageFit Fit { get; set; }
Property Value
Frame
Frame shown when not playing (film-strip only).
public int Frame { get; set; }
Property Value
FramesPerSecond
Animation speed.
public double FramesPerSecond { get; set; }
Property Value
Image
Static image (ignored when FilmStrip is set).
public ImageSource? Image { get; set; }
Property Value
IsPlaying
true while the film-strip animation runs.
public bool IsPlaying { get; set; }
Property Value
Loop
Restarts at the first frame after the last one; otherwise stops on the last frame.
public bool Loop { get; set; }
Property Value
PingPong
Plays back and forth (ping-pong) instead of wrapping.
public bool PingPong { get; set; }
Property Value
Smooth
Smooth (bilinear) scaling; turn off for pixel art.
public bool Smooth { get; set; }
Property Value
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
dcDrawingContextwidgetRectstyleVectorStyle
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