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

StackLayout width larger that display width

$
0
0

Hi all!
I need to have a StackLayout or Grid with a width larger that device width.

<StackLayout x:Name="slParent" 
                 Orientation="Horizontal" 
                 HorizontalOptions="FillAndExpand"
                 VerticalOptions="FillAndExpand"
                 BackgroundColor="Red" >
<StackLayout x:Name="slOne" 
                     Orientation="Vertical" 
                     BackgroundColor="Yellow" 
                     WidthRequest="300" />
<StackLayout x:Name="slTwo" 
                     Orientation="Vertical" 
                     BackgroundColor="Orange" 
                     WidthRequest="300" />
</StackLayout>

slTwo is beyond visible area, but width of slParent is equal to the width of the screen.
I tried to use Grid instead of StackLayout but i had the same result.
What do i do wrong?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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