windowsforms-117311-common-features-behaviors-banner-behavior.md
The Banner Behavior turns a PictureEdit editor into a simplified Image Slider that loops through a collection of images.
The behavior stores banner images that replace the original editor image after a certain delay.
Supported controls
Behavior options
Code sample
using DevExpress.Utils.Behaviors.Common;
behaviorManager1.Attach<BannerBehavior>(pictureEdit1, behavior => {
behavior.Properties.StartImmediately = false;
behavior.Properties.Interval = 3000;
behavior.Properties.Images = new System.Drawing.Image[] {
((System.Drawing.Image)(global::Behaviors.Properties.Resources.SpecialOffer_Image1)),
((System.Drawing.Image)(global::Behaviors.Properties.Resources.SpecialOffer_Image2))
};
});
Imports DevExpress.Utils.Behaviors.Common
Private behaviorManager1.Attach(Of BannerBehavior)(pictureEdit1, Sub(behavior)
behavior.Properties.StartImmediately = False
behavior.Properties.Interval = 3000
behavior.Properties.Images = New System.Drawing.Image() {
(CType(Global.Behaviors.Properties.Resources.SpecialOffer_Image1, System.Drawing.Image)),
(CType(Global.Behaviors.Properties.Resources.SpecialOffer_Image2, System.Drawing.Image)) }
End Sub)