Skip to main content

CustomWallpaper

The CustomWallpaper extender component enhances the Desktop, the MainPage or any Control control by rotating a list of custom images over the control’s background.

Code Example

Panel panel = new Panel();
panel.Dock = DockStyle.Fill;
this.Controls.Add(panel);

CustomWallpaper paper = new CustomWallpaper();
paper.Control = panel;
paper.Images = new ImageListEntry[] {
new ImageListEntry("Images\\apple.png", "apple"),
new ImageListEntry("Images\\frog.png", "frog"),
new ImageListEntry("Images\\tree.jpg", "tree")};
paper.RotationInterval = 1000;

This code snippet first creates a Panel and sets the DockStyle to fill so that it will fill the entire page. It then creates a new CustomWallpaper and sets the Control property of the CustomWallpaper to be the panel. This means that the images of the CustomWallpaper will be displayed in the panel.

Next the Images of the CustomWallpaper are set. There are 3 images- apple.png, frog.png, and tree.jpg, all stored in a folder called Images. The Images folder is located in the root directory of the project.

Finally the RotationInterval is set to 1000. This means that the images will rotate every 1000 milliseconds, or every second.

How to Use

The CustomWallpaper extension can be added to a Wisej.NET project using NuGet Package Manager.

You can control the Animation with EnableAnimation and FadeTime (in milliseconds).
The RotationInterval (in milliseconds) defines the interval to switch between your Images.

info

Find more information in our CustomWallpaper example in C# or in VB.NET.