我试图把两个按钮内的HorizontalStackLayout通过使用“HorizontalOptions='End'”但它没有工作这里是代码和结果作为一个图片:
`<VerticalStackLayout Padding="30">
<Label
Text="History"
VerticalOptions="Start"
HorizontalOptions="Start" />
<Border>
<HorizontalStackLayout BackgroundColor="Black">
<Border>
<Label VerticalTextAlignment="Center" MaximumWidthRequest="500" TextColor="White" MaximumHeightRequest="60" Text="Lorem Ipsum is simply dummy text of the printing and typesetting industry" />
</Border>
<Button BackgroundColor="Wheat" TextColor="Black" Text="Send" HorizontalOptions="End"/>
<Button BackgroundColor="Wheat" TextColor="Black" Text="Delete" HorizontalOptions="End"/>
</HorizontalStackLayout>
</Border>
</VerticalStackLayout>`
1条答案
按热度按时间kqlmhetl1#
对我来说,解决方案是创建一个父元素Grit,列定义=“N,Auto,N”(N只是一个数字,你可以选择它),用这个解决方案,按钮后面没有空间。