cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
migueldctech
Level: Power Up

Backkground Image

I have setup a Welcome screen with a background image, is there a way to change that image, sort of like a Theme, where there is a collection of images and it changes every 60sec or so.

4 REPLIES 4
RezaDorrani
Level 10

Re: Backkground Image

Hi @migueldctech 

 

You can load your images in the PowerApp Media section and then use timer control to change images based on a schedule

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

migueldctech
Level: Power Up

Re: Backkground Image

Thank you Reza, if we are talking about the process below, where do i set for the timer or the image to change from image1 to image 2?

 

Screen OnVisible action: UpdateContext({ShowImage: false})
Image Visible property: ShowImage

Timer Duration property: the number of milliseconds you want to wait before showing image

Timer AutoStart property: true

Timer Visible property: false

Timer OnTimerEnd action: UpdateContext({ShowImage: true})

RezaDorrani
Level 10

Re: Backkground Image

Hi @migueldctech 

 

 

set a variable every time timer ends 

exmaple 

 

set(var, var+ 1)

 

this will keep chaning variable from 1-4 and once it hits 4 then reset to 1

 

for image control, you can add switch logic

 

swicth(var, 1, image1, 2,image2,3,image3 etc.)

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Community Support Team
Community Support Team

Re: Backkground Image

Hi @migueldctech ,

Do you want to change the Background Image of your Welcome screen every 60sec?

 

The user @dan_harner has faced a same issue with you, please check the response within the following thread:

https://powerusers.microsoft.com/t5/Creating-Apps/Background-Image-Changing/m-p/306057

 

On your side, you should take a try with the following workaround:

Set the OnStart property of the App to following:

ClearCollect(
             Images,
             { Index: 1, Url: "https://c.pxhere.com/photos/88/8b/family_baby_tree_cute_animal_animals_fur_zoo-189932.jpg!d" },
             { Index: 2, Url: "https://c.pxhere.com/photos/f8/32/baby_cute_animal_animals_fur_zoo_tiere_high-190891.jpg!d" },
             { Index: 3, Url: "https://c.pxhere.com/photos/2c/13/portrait_cute_face_animal_animals_germany_fur_deutschland-190772.jpg!d" },
             { Index: 4, Url: "https://c.pxhere.com/photos/c8/ce/adorable_animal_animal_photography_cute_furry_outdoors_red_panda_wildlife-1175486.jpg!d" },
             { Index: 5, Url: "https://c.pxhere.com/photos/f2/a8/squirrel_furry_animal_fluffy_brown_outdoor_small_curious-569161.jpg!d" },
             { Index: 6, Url: "https://images.pexels.com/photos/146153/pexels-photo-146153.jpeg?cs=srgb&dl=animal-cute-furry-146153.jpg&fm=jpg" }
); Set(CurrentIndex, 1)

Note: If you load your all Background images into your app already, you need to set the Url property within above Images collection to your Image media within your app.

 

Set the BackgroundImage property of the Welcome screen to following:

LookUp(Images, Index = CurrentIndex, Url)

 

Then add a Timer control within your app, set the Duration property to following:

60000

set the AutoStart property and Repeat property of the Timer to following:

true

set the OnTimerEnd property to following:

Set(CurrentIndex, If(CurrentIndex = CountRows(Images), 1, CurrentIndex + 1))

set the Visible property of the Timer control to following:

false

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 43 members 4,769 guests
Please welcome our newest community members: