BinarySlideShow
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
BinarySlideShow | Initializes a new instance of the BinarySlideShow class. |
BlendEffectStartColor | Gets or sets the start blend color. |
BlendEffectTransitionColor | Gets or sets the transition blend color. |
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. |
DefaultSlideContentText | Gets or sets the default slide content text. |
IsPaused | Gets or sets a value indicating whether the slide show is currently paused. |
IsShowDefaultBlankSlideAtStartup | Gets or sets a value indicating whether this instance will show the default blank slide at startup. |
IsStopped | Gets or sets a value indicating whether the slide show is is stopped. |
SlideContent | Gets or sets the content of the slide. |
SlideTransitionEffect | Gets or sets the slide transition effect. |
SlideTransitionTimerInterval | Gets or sets the slide transition timer interval. |
Slides | Gets or sets the slides. |
StartSlideShowOnceInstantiated | Gets or sets a value indicating whether [start slide show once instantiated]. |
GoToFirstSlide | Transition to the first slide. |
GoToLastSlide | Transition to the last slide. |
GoToThisSlide | Plays the desired slide content, and if the startPlayingFromTheDesiredIndex is set to true, the control starts playing the slideshow from this desired slide index. |
Next | Transition to the next slide. |
OnApplyTemplate | When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate. |
Pause | Pauses the currently running slideshow. |
Play | Plays the slidesshow. |
PlayThisSlide | Plays the specified slide instance. |
Previous | Transition to the previous slide. |
Resume | Resumes the currently paused slideshow. |
Stop | Stops the currently running slideshow. |
AboutToGoToASpecificSlideIndex | Occurs when the control's GoToThisSlide method is about to be executed. |
AboutToGoToFirstSlide | Occurs when the control's GoToFirstSlide method is about to be executed. |
AboutToGoToLastSlide | Occurs when the control's GoToLastSlide method is about to be executed. |
AboutToGoToNextSlide | Occurs when the control's Next method is about to be executed. |
AboutToGoToPreviousSlide | Occurs when the control's Previous method is about to be executed. |
AboutToGoToSpecificSlideInstance | Occurs when the control's PlayThisSlide method is about to be executed. |
AboutToPause | Occurs when the control's Pause method is about to be executed. |
AboutToPlay | Occurs when the control's Play method is about to be executed. |
AboutToResume | Occurs when the control's Resume method is about to be executed. |
AboutToStop | Occurs when the control's Stop method is about to be executed. |
BlendEffectStartColorProperty | Identifies the BlendEffectStartColor dependency property. |
BlendEffectTransitionColorProperty | Identifies the BlendEffectTransitionColor dependency property. |
DefaultSlideContentProperty | DefaultSlideContent property. |
DefaultSlideContentTextProperty | DefaultSlideContentText property |
IsShowDefaultBlankSlideAtStartupProperty | IsShowDefaultBlankSlideAtStartup property. |
SlideContentProperty | SlideContent property. |
SlideTransitionEffectProperty | SlideTransitionEffect property. |
SlideTransitionTimerIntervalProperty | Identifies the SlideTransitionTimerInterval dependency property. |
SlidesProperty | Slides property. |
StartSlideShowOnceInstantiatedProperty | StartSlideShowOnceInstantiated property. |
Constructors
BinarySlideShow
Initializes a new instance of the BinarySlideShow class.
Properties
BlendEffectStartColor
Gets or sets the start blend color.
BlendEffectTransitionColor
Gets or sets the transition blend color.
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
Gets or sets the default slide content text.
Value. The default slide content text.
IsPaused
Gets or sets a value indicating whether the slide show is currently paused.
IsShowDefaultBlankSlideAtStartup
Gets or sets a value indicating whether this instance will show the default blank slide at startup.
IsStopped
Gets or sets a value indicating whether the slide show is is stopped.
SlideContent
Gets or sets the content of the slide.
Value. The content of the slide.
SlideTransitionEffect
Gets or sets the slide transition effect.
Value. The slide transition effect.
SlideTransitionTimerInterval
Gets or sets the slide transition timer interval.
Value. The slide transition timer interval.
Slides
Gets or sets the slides.
Value. The slides.
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
Transition to the first slide.
GoToLastSlide
Transition to the last slide.
GoToThisSlide
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
Transition to the next slide.
OnApplyTemplate
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
Pause
Pauses the currently running slideshow.
Play
Plays the slidesshow.
PlayThisSlide
Plays the specified slide instance.
- slide
- The slide.
Previous
Transition to the previous slide.
Resume
Resumes the currently paused slideshow.
Stop
Stops the currently running slideshow.
Events
AboutToGoToASpecificSlideIndex
Occurs when the control's GoToThisSlide method is about to be executed.
AboutToGoToFirstSlide
Occurs when the control's GoToFirstSlide method is about to be executed.
AboutToGoToLastSlide
Occurs when the control's GoToLastSlide method is about to be executed.
AboutToGoToNextSlide
Occurs when the control's Next method is about to be executed.
AboutToGoToPreviousSlide
Occurs when the control's Previous method is about to be executed.
AboutToGoToSpecificSlideInstance
Occurs when the control's PlayThisSlide method is about to be executed.
AboutToPause
Occurs when the control's Pause method is about to be executed.
AboutToPlay
Occurs when the control's Play method is about to be executed.
AboutToResume
Occurs when the control's Resume method is about to be executed.
AboutToStop
Occurs when the control's Stop method is about to be executed.
Fields
BlendEffectStartColorProperty
Identifies the BlendEffectStartColor dependency property.
BlendEffectTransitionColorProperty
Identifies the BlendEffectTransitionColor dependency property.
DefaultSlideContentProperty
DefaultSlideContent property.
DefaultSlideContentTextProperty
DefaultSlideContentText property
IsShowDefaultBlankSlideAtStartupProperty
IsShowDefaultBlankSlideAtStartup property.
SlideContentProperty
SlideContent property.
SlideTransitionEffectProperty
SlideTransitionEffect property.
SlideTransitionTimerIntervalProperty
Identifies the SlideTransitionTimerInterval dependency property.
SlidesProperty
Slides property.
StartSlideShowOnceInstantiatedProperty
StartSlideShowOnceInstantiated property.