HypernovaDesktop Components · docs
Binarymission
WPFSlide Show › BinarySlideShow

BinarySlideShow

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.InteractionControls

A custom control that provides slide-show capabilities, supported with various "slide transition" effects.

public class BinarySlideShow : ContentControl

Inherits from / implements: ContentControl

Remarks

The control is very straight-forward to use.
Step 1: Setup content (slides) for the control.
Step 2: Instantiate the control, and setup the properties SlideTransitionTimerInterval, SlideTransitionEffect and more properties as needed.
Step 3: Run the control, either by specifically calling on its Play method, or setup the property StartSlideShowOnceInstantiated to true.
The Slides content can be setup in two mays for the control:
1. Set up a data source that contains a set of Slide instances (of type BinarySlideShowItem), and set the property SlideContent with data binding to serve the data to the control.
OR 2. Set the property Slides with a collection of slides (of type BinarySlideShowItem).
Finally, if you want a timer activated Slide show session, simply set the property SlideTransitionTimerInterval with the Milli-seconds value as the time interval between slides display. If you need keyboard / mouse activated slide show run, you can hook into the appropriate events on the BinarySlideShow class, and use the programmatic interface to navigate across slides using the following methods:
Play, Pause, Resume, Stop and many other slide navigation methods.

Members at a glance

BinarySlideShowInitializes a new instance of the BinarySlideShow class.
BlendEffectStartColorGets or sets the start blend color.
BlendEffectTransitionColorGets or sets the transition blend color.
DefaultSlideContentGets or sets the content of the default slide. If a valid slide is provided for this property, this will be used to display as the first slide before showing the full slide content from Slides.
DefaultSlideContentTextGets or sets the default slide content text.
IsPausedGets or sets a value indicating whether the slide show is currently paused.
IsShowDefaultBlankSlideAtStartupGets or sets a value indicating whether this instance will show the default blank slide at startup.
IsStoppedGets or sets a value indicating whether the slide show is is stopped.
SlideContentGets or sets the content of the slide.
SlideTransitionEffectGets or sets the slide transition effect.
SlideTransitionTimerIntervalGets or sets the slide transition timer interval.
SlidesGets or sets the slides.
StartSlideShowOnceInstantiatedGets or sets a value indicating whether [start slide show once instantiated].
GoToFirstSlideTransition to the first slide.
GoToLastSlideTransition to the last slide.
GoToThisSlidePlays the desired slide content, and if the startPlayingFromTheDesiredIndex is set to true, the control starts playing the slideshow from this desired slide index.
NextTransition to the next slide.
OnApplyTemplateWhen overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
PausePauses the currently running slideshow.
PlayPlays the slidesshow.
PlayThisSlidePlays the specified slide instance.
PreviousTransition to the previous slide.
ResumeResumes the currently paused slideshow.
StopStops the currently running slideshow.
AboutToGoToASpecificSlideIndexOccurs when the control's GoToThisSlide method is about to be executed.
AboutToGoToFirstSlideOccurs when the control's GoToFirstSlide method is about to be executed.
AboutToGoToLastSlideOccurs when the control's GoToLastSlide method is about to be executed.
AboutToGoToNextSlideOccurs when the control's Next method is about to be executed.
AboutToGoToPreviousSlideOccurs when the control's Previous method is about to be executed.
AboutToGoToSpecificSlideInstanceOccurs when the control's PlayThisSlide method is about to be executed.
AboutToPauseOccurs when the control's Pause method is about to be executed.
AboutToPlayOccurs when the control's Play method is about to be executed.
AboutToResumeOccurs when the control's Resume method is about to be executed.
AboutToStopOccurs when the control's Stop method is about to be executed.
BlendEffectStartColorPropertyIdentifies the BlendEffectStartColor dependency property.
BlendEffectTransitionColorPropertyIdentifies the BlendEffectTransitionColor dependency property.
DefaultSlideContentPropertyDefaultSlideContent property.
DefaultSlideContentTextPropertyDefaultSlideContentText property
IsShowDefaultBlankSlideAtStartupPropertyIsShowDefaultBlankSlideAtStartup property.
SlideContentPropertySlideContent property.
SlideTransitionEffectPropertySlideTransitionEffect property.
SlideTransitionTimerIntervalPropertyIdentifies the SlideTransitionTimerInterval dependency property.
SlidesPropertySlides property.
StartSlideShowOnceInstantiatedPropertyStartSlideShowOnceInstantiated property.

Constructors

BinarySlideShow

public BinarySlideShow()

Initializes a new instance of the BinarySlideShow class.

Properties

BlendEffectStartColor

public Color BlendEffectStartColor

Gets or sets the start blend color.

BlendEffectTransitionColor

public Color BlendEffectTransitionColor

Gets or sets the transition blend color.

DefaultSlideContent

public object DefaultSlideContent

Gets or sets the content of the default slide. If a valid slide is provided for this property, this will be used to display as the first slide before showing the full slide content from Slides.

Value. The content of the default slide.

DefaultSlideContentText

public string DefaultSlideContentText

Gets or sets the default slide content text.

Value. The default slide content text.

IsPaused

public bool IsPaused

Gets or sets a value indicating whether the slide show is currently paused.

IsShowDefaultBlankSlideAtStartup

public bool IsShowDefaultBlankSlideAtStartup

Gets or sets a value indicating whether this instance will show the default blank slide at startup.

IsStopped

public bool IsStopped

Gets or sets a value indicating whether the slide show is is stopped.

SlideContent

public object SlideContent

Gets or sets the content of the slide.

Value. The content of the slide.

SlideTransitionEffect

public SlideTransitionEffect SlideTransitionEffect

Gets or sets the slide transition effect.

Value. The slide transition effect.

SlideTransitionTimerInterval

public double SlideTransitionTimerInterval

Gets or sets the slide transition timer interval.

Value. The slide transition timer interval.

Slides

public List<BinarySlideShowItem> Slides

Gets or sets the slides.

Value. The slides.

StartSlideShowOnceInstantiated

public bool StartSlideShowOnceInstantiated

Gets or sets a value indicating whether [start slide show once instantiated].

Value. true if [start slide show once instantiated]; otherwise, false .

Methods

GoToFirstSlide

public void GoToFirstSlide()

Transition to the first slide.

GoToLastSlide

public void GoToLastSlide()

Transition to the last slide.

GoToThisSlide

public void GoToThisSlide(int slideIndex, bool startPlayingFromTheDesiredIndex)

Plays the desired slide content, and if the startPlayingFromTheDesiredIndex is set to true, the control starts playing the slideshow from this desired slide index.

slideIndex
Index of the desired slide.
startPlayingFromTheDesiredIndex
If set to true, the control will play the slideshow from the specified slide index.

Next

public void Next()

Transition to the next slide.

OnApplyTemplate

public override void OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.

Pause

public void Pause()

Pauses the currently running slideshow.

Play

public void Play()

Plays the slidesshow.

PlayThisSlide

public void PlayThisSlide(BinarySlideShowItem slide)

Plays the specified slide instance.

slide
The slide.

Previous

public void Previous()

Transition to the previous slide.

Resume

public void Resume()

Resumes the currently paused slideshow.

Stop

public void Stop()

Stops the currently running slideshow.

Events

AboutToGoToASpecificSlideIndex

public event EventHandler<SlideShowEventArgs> AboutToGoToASpecificSlideIndex

Occurs when the control's GoToThisSlide method is about to be executed.

AboutToGoToFirstSlide

public event EventHandler<SlideShowEventArgs> AboutToGoToFirstSlide

Occurs when the control's GoToFirstSlide method is about to be executed.

AboutToGoToLastSlide

public event EventHandler<SlideShowEventArgs> AboutToGoToLastSlide

Occurs when the control's GoToLastSlide method is about to be executed.

AboutToGoToNextSlide

public event EventHandler<SlideShowEventArgs> AboutToGoToNextSlide

Occurs when the control's Next method is about to be executed.

AboutToGoToPreviousSlide

public event EventHandler<SlideShowEventArgs> AboutToGoToPreviousSlide

Occurs when the control's Previous method is about to be executed.

AboutToGoToSpecificSlideInstance

public event EventHandler<SlideShowEventArgs> AboutToGoToSpecificSlideInstance

Occurs when the control's PlayThisSlide method is about to be executed.

AboutToPause

public event EventHandler<SlideShowEventArgs> AboutToPause

Occurs when the control's Pause method is about to be executed.

AboutToPlay

public event EventHandler<SlideShowEventArgs> AboutToPlay

Occurs when the control's Play method is about to be executed.

AboutToResume

public event EventHandler<SlideShowEventArgs> AboutToResume

Occurs when the control's Resume method is about to be executed.

AboutToStop

public event EventHandler<SlideShowEventArgs> AboutToStop

Occurs when the control's Stop method is about to be executed.

Fields

BlendEffectStartColorProperty

public static readonly DependencyProperty BlendEffectStartColorProperty

Identifies the BlendEffectStartColor dependency property.

BlendEffectTransitionColorProperty

public static readonly DependencyProperty BlendEffectTransitionColorProperty

Identifies the BlendEffectTransitionColor dependency property.

DefaultSlideContentProperty

public static readonly DependencyProperty DefaultSlideContentProperty

DefaultSlideContent property.

DefaultSlideContentTextProperty

public static readonly DependencyProperty DefaultSlideContentTextProperty

DefaultSlideContentText property

IsShowDefaultBlankSlideAtStartupProperty

public static readonly DependencyProperty IsShowDefaultBlankSlideAtStartupProperty

IsShowDefaultBlankSlideAtStartup property.

SlideContentProperty

public static readonly DependencyProperty SlideContentProperty

SlideContent property.

SlideTransitionEffectProperty

public static readonly DependencyProperty SlideTransitionEffectProperty

SlideTransitionEffect property.

SlideTransitionTimerIntervalProperty

public static readonly DependencyProperty SlideTransitionTimerIntervalProperty = DependencyProperty.Register( "SlideTransitionTimerInterval", typeof(double), typeof(BinarySlideShow), new PropertyMetadata(3000d, (o, args)

Identifies the SlideTransitionTimerInterval dependency property.

SlidesProperty

public static readonly DependencyProperty SlidesProperty

Slides property.

StartSlideShowOnceInstantiatedProperty

public static readonly DependencyProperty StartSlideShowOnceInstantiatedProperty

StartSlideShowOnceInstantiated property.