How to set z-index on a control within AbsoluteLayout in xaml?

Viewed 1519

I have an AbsoluteLayout on a view in my Xamarin.Forms app, with 3 buttons in it. After another control is added programmatically, it covers the buttons. I cannot figure out how I can make the buttons to be always in front.

  <ContentPage.Content>
    <AbsoluteLayout x:Name="Container" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">

        <Button
            Style="{StaticResource CallButtonStyle}"      
             ...                
            AbsoluteLayout.LayoutFlags="PositionProportional"  
            AbsoluteLayout.LayoutBounds=".85,.02" 
            Text="{Binding CameraSwitchIcon}" />

        <Button
            ...
            AbsoluteLayout.LayoutFlags="PositionProportional"  
            AbsoluteLayout.LayoutBounds=".15,.95,80,80"
            Text="{Binding VideoToggleIcon}" />

        <Button
            ...
            AbsoluteLayout.LayoutFlags="PositionProportional"  
            AbsoluteLayout.LayoutBounds=".85,.95,80,80"
            Text="{Binding AudioToggleIcon}" />

    </AbsoluteLayout>
</ContentPage.Content>
1 Answers

all XF Layouts have RaiseChild() and LowerChild() methods you can use to adjust the Z index

Related