J Jason Wood Member Licensed User Jun 22, 2017 #1 I have some buttons in a layout, created in the designer. I've even right clicked them and selected 'send to back' in the designer. In the same layout, I have a panel that contains various labels etc - pnlInfo, also created in the designer. In the Main activity, I create a new panel, add it to the activity then set it to 'BringToFront' since I want it to be in front of everything else Code: Copy ' CREATE PANEL TO HOLD THE GAMES pnlGame.Initialize("pnlGame") pnlGame.Color = Colors.Blue Activity.AddView(pnlGame, 100%x, 0, 100%x, 100%y) pnlGame.BringToFront It's initially off screen to the right. Later I animate the panel it in to the left. When it comes into view, it covers the pnlInfo but it does not cover the buttons. The buttons are still above the new Panel. So my question is, why are the buttons still above the panel?
I have some buttons in a layout, created in the designer. I've even right clicked them and selected 'send to back' in the designer. In the same layout, I have a panel that contains various labels etc - pnlInfo, also created in the designer. In the Main activity, I create a new panel, add it to the activity then set it to 'BringToFront' since I want it to be in front of everything else Code: Copy ' CREATE PANEL TO HOLD THE GAMES pnlGame.Initialize("pnlGame") pnlGame.Color = Colors.Blue Activity.AddView(pnlGame, 100%x, 0, 100%x, 100%y) pnlGame.BringToFront It's initially off screen to the right. Later I animate the panel it in to the left. When it comes into view, it covers the pnlInfo but it does not cover the buttons. The buttons are still above the new Panel. So my question is, why are the buttons still above the panel?
DonManfred Expert Licensed User Longtime User Jun 22, 2017 #2 Set the panels Elevation property to 8dip Upvote 0
J Jason Wood Member Licensed User Jun 22, 2017 #3 Thanks for replying. I set it like this but still the same problem Code: Copy pnlGame.Elevation = 8dip Plus there is no mention of 'elevation' on the beginners guide or user guide so I don't really know what it is. I's also not mentioned in the documentation for the core library so I don't know where to read up on it. Is there another solution? Or am I not using this 'elevation' correctly? Upvote 0
Thanks for replying. I set it like this but still the same problem Code: Copy pnlGame.Elevation = 8dip Plus there is no mention of 'elevation' on the beginners guide or user guide so I don't really know what it is. I's also not mentioned in the documentation for the core library so I don't know where to read up on it. Is there another solution? Or am I not using this 'elevation' correctly?
J Jason Wood Member Licensed User Jun 22, 2017 #4 Sorry, I managed to fix this issue - there was another call to pnlGame.BringToFront after the animation which I think was overriding the Elevation. But I'd still like to find out more about what this 'elevation' is. Does anyone have a link to some info? Cheers Upvote 0
Sorry, I managed to fix this issue - there was another call to pnlGame.BringToFront after the animation which I think was overriding the Elevation. But I'd still like to find out more about what this 'elevation' is. Does anyone have a link to some info? Cheers
DonManfred Expert Licensed User Longtime User Jun 22, 2017 #5 https://material.io/guidelines/material-design/elevation-shadows.html Upvote 0