[英]How to remove empty space in StackLayout - Xamarin
I have a StackLayout with one button and two labels.我有一个带有一个按钮和两个标签的 StackLayout。
I want to remove the empty space between StackLayout and the button.我想删除 StackLayout 和按钮之间的空白空间。
I using Spacing = "0" but this isn't work for me.我使用 Spacing = "0" 但这对我不起作用。
<StackLayout VerticalOptions="EndAndExpand"
HorizontalOptions="EndAndExpand"
Spacing="0">
<Button Text="ОФИЦИАЛЕН WEB САЙТ"
VerticalOptions="CenterAndExpand"
HorizontalOptions="Center"
Clicked="OnButtonClickedWeb"
x:Name="webButton"
WidthRequest="150"
HeightRequest="30"
FontSize="10"/>
<Label Text="Създаден от Благовест Пижев, тел: +359 899 91 66 79, е-mail: pizhevsoft@gmail.com"
HorizontalOptions="CenterAndExpand"
VerticalOptions="EndAndExpand"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
FontAttributes="Bold"
FontSize="10"
TextColor="White"/>
<Label Text="Финансирано по програма ННП 'Млади учени, докторанти и постдокторанти.' от МОН. НИМХ - Филиал Пловдив."
HorizontalOptions="EndAndExpand"
VerticalOptions="EndAndExpand"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
FontAttributes="Bold"
FontSize="10"
TextColor="White"/>
</StackLayout>
When I use HeighRequest the lyrics of the labels are not visible and go down.当我使用 HeighRequest 时,标签的歌词不可见并且 go 向下。
you can add Padding Property Padding="0"您可以添加填充属性 Padding="0"
you can also(if you want) add Margin="0,-10,0,0"您还可以(如果需要)添加 Margin="0,-10,0,0"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.