Hi
So I created a fly out menu according to Shane Youngs example: https://www.youtube.com/watch?v=D_Kb7AXSE0s
I only have one issue, when I start the app the Context variable is false but the fly out menu is still visible.
My Square icon (Menu sliding out)
X =
If(ShowMenu, -FlyOutMenu.Width + FlyOutMenu.Width * (Timer1.Value/Timer1.Duration), -FlyOutMenu.Width * (Timer1.Value/Timer1.Duration))
My timer
Start = StartMenuTimer
My button for expanding the menu.
OnSelect =
UpdateContext({StartMenuTimer:false}); UpdateContext({ShowMenu:!ShowMenu, StartMenuTimer:true})
My issue is when I Start the app, then the variable ShowMenu = false but the Menu (icon square) is still showing, once I click the button once then it is set to true and the menu slides out and next click the menu it slides in. But the first view when the app starts is that it's out like the ShowMenu = true but it equals false.
Im going crazy over this 😥
Solved! Go to Solution.
Solved it
MenuBlock
X = If(!varMenu2,1366,1366-200*(Timer3.Value/Timer3.Duration))
Width = If(!varMenu2,100,100+200*(Timer3.Value&Timer3.Duration))
Timer
Start = varTimer
OnTimerEnd = If(!varMenu2,Reset(Timer3),false)
Button
OnSelect = UpdateContext({varTimer:false});UpdateContext({varMenu2:!varMenu2, varTimer:true})
This produces a screen that at first shows no menu.
When button is click the menu slides out from the right side, when button is clicked again it closes the menu.
Hi @JimmyWork ,
At screen OnVisible, put this
UpdateContext({ShowMenu:false})
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
@WarrenBelz Thank you but I have already tried this and it does not work, it still shows
In another solution that just uses visible true or false, no sliding menu all I had to do was.
OnSelect = UpdateContext({FiltersOn:!FiltersOn});
Visible = If(FiltersOn, true, true, false)
The it would not be visible and button works as it should, but with this sliding out menu nothing seems to be working. The variable is false by default so I don't know why it's even showing
Seems like I got something working like I Want to but I'm pretty sure it's not the correct way of doing this.
My Square icon (Menu sliding out)
X =
If(!ShowMenu, 670+FlyOutMenu.Width* (Timer1.Value/Timer1.Duration), 670+FlyOutMenu.Width- FlyOutMenu.Width * (Timer1.Value/Timer1.Duration))
Visible =
If(ShowMenu = true, true, false)
My timer
Start = StartMenuTimer
OnTimerEnd =
If(!ShowMenu,Reset(Timer1), false)
My button for expanding the menu.
OnSelect =
UpdateContext({StartMenuTimer:false}); UpdateContext({ShowMenu:!ShowMenu, StartMenuTimer:true})
As you can understand, I can only be guided by what you posted and if you set the Visible to false and this is the only criteria, it cannot possibly show. It seems the timer also has something to do with it.
@WarrenBelz Not sure what you mean, setting it to false actually made it work. Not showing when started. before i had the issue with when the variable was false the menu was still showing at start and even if you set the variable OnVisble it was still showing.
What I posted achieves what I want, but, it's not done correctly like you stated with the visible part.
Defiantly something with the timer but I don't know how to solve this, been stuck on it for to long 😞
Solved it
MenuBlock
X = If(!varMenu2,1366,1366-200*(Timer3.Value/Timer3.Duration))
Width = If(!varMenu2,100,100+200*(Timer3.Value&Timer3.Duration))
Timer
Start = varTimer
OnTimerEnd = If(!varMenu2,Reset(Timer3),false)
Button
OnSelect = UpdateContext({varTimer:false});UpdateContext({varMenu2:!varMenu2, varTimer:true})
This produces a screen that at first shows no menu.
When button is click the menu slides out from the right side, when button is clicked again it closes the menu.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
192 | |
67 | |
46 | |
41 | |
22 |
User | Count |
---|---|
251 | |
122 | |
83 | |
80 | |
68 |