Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Create a layered Page/layering controls

$
0
0

Maybe I'm not searching for the right thing here, but by the life of me I cannot find a good sample of how to layer one control over the other, in XAML.

For instance I have a map control and I want to add a box with some data and buttons on top of it, much like how RunKeeper did;

I've did some experimenting with the Relative- and AbsoluteLayout, but I can't quite figure out how to do it.
Is there anyone who could give me a little push in the right direction with this?

Here is what I have so far;

 <StackLayout Orientation="Vertical">
   <maps:Map x:Name="MapControl" HasZoomEnabled="True" IsShowingUser="True" MapType="Street"></maps:Map>
   <Grid>
     <Grid.ColumnDefinitions>
       <ColumnDefinition Width="*" />
       <ColumnDefinition Width="*" />
       <ColumnDefinition Width="*" />
     </Grid.ColumnDefinitions>

     <Button Grid.Column="0" Text="{Binding ButtonCaption}" Command="{Binding StartStopTripCommand}" />
     <Button Grid.Column="1" Text="Verstuur" Command="{Binding SendTripCommand}" />
     <Label Grid.Column="2" Text="{Binding CurrentSpeedDescription}" />
   </Grid>
 </StackLayout>

And the grid would be floating at the top, instead of now being stacked below.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>