I have an image Control named Image5.
I have a button.
I will put to Button's OnSelect function something like
Rotate90....
But how will I make the reference to Image5? What's the complete formula?
Solved! Go to Solution.
Hi @Finnair
You can do this by setting the OnVisible property of your screen to this:
UpdateContext({locRotate:ImageRotation.None}
In your Image5 control, you would set the ImageRotation property to locRotate
You would then set the OnSelect property of your button to this:
Switch(locRotate,
ImageRotation.None, UpdateContext({locRotate:ImageRotation.Rotate90}),
ImageRotation.Rotate90, UpdateContext({locRotate:ImageRotation.Rotate180}),
ImageRotation.Rotate180, UpdateContext({locRotate:ImageRotation.Rotate270}),
ImageRotation.Rotate270, UpdateContext({locRotate:ImageRotation.None}),
UpdateContext({locRotate:ImageRotation.None})
)
Hi @Finnair
You can do this by setting the OnVisible property of your screen to this:
UpdateContext({locRotate:ImageRotation.None}
In your Image5 control, you would set the ImageRotation property to locRotate
You would then set the OnSelect property of your button to this:
Switch(locRotate,
ImageRotation.None, UpdateContext({locRotate:ImageRotation.Rotate90}),
ImageRotation.Rotate90, UpdateContext({locRotate:ImageRotation.Rotate180}),
ImageRotation.Rotate180, UpdateContext({locRotate:ImageRotation.Rotate270}),
ImageRotation.Rotate270, UpdateContext({locRotate:ImageRotation.None}),
UpdateContext({locRotate:ImageRotation.None})
)
@timl Thank you very much, it's marvelous and it works!
There's a little typo: last bracket missing in OnVisible code snippet.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
184 | |
51 | |
47 | |
32 | |
32 |
User | Count |
---|---|
265 | |
91 | |
78 | |
68 | |
67 |