Sobrepor Elementos

Asked

Viewed 119 times

0

Good afternoon

I’m new to Xamarin and I’m having trouble overlapping elements. I made a few attempts, but unsuccessfully.

<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"></ColumnDefinition>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="100"></RowDefinition>
    </Grid.RowDefinitions>

    <Frame Grid.Column="0" Grid.Row="1" >
        <BoxView BackgroundColor="Red" HorizontalOptions="End" VerticalOptions="Start" CornerRadius="10" HeightRequest="15" WidthRequest="15"></BoxView>
    </Frame>
    <Button  Grid.Column="0" Grid.Row="1" BackgroundColor="Accent"  Text="Recados" Command="{Binding SwitchToTabCommand}" CommandParameter="4"></Button>

</Grid>

Can anyone tell me where the mistake is ?

1 answer

0

I figured out a way. I changed the backgroud q I wanted to the frame and left the one on the button transparent. What was happening was that the button was getting over the frame and when I put the backgroud, it topped the Boxview.

<Frame Grid.Column="0" Grid.Row="2" BackgroundColor="Accent" >
    <BoxView BackgroundColor="Red" HorizontalOptions="End" VerticalOptions="Start" CornerRadius="10" HeightRequest="15" WidthRequest="15"></BoxView>
</Frame>
<Button  Grid.Column="0" Grid.Row="2" BackgroundColor="Transparent"  Text="Recados" Command="{Binding SwitchToTabCommand}" CommandParameter="4"></Button>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.