【发布时间】:2015-01-11 16:25:51
【问题描述】:
我在 Xamarin Forms 中有一个简单的自定义磁贴控件,但我无法像在 MS Xaml 中所期望的那样使内部对齐工作。 (在 Xamarin.iOS 上(适用于 iPad!))
<ContentView.Content>
<Grid x:Name="LayoutGrid" BindingContext="{x:Reference tile}" BackgroundColor="{Binding Color}">
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="ExecuteCommandOnTapped" />
</Grid.GestureRecognizers>
<StackLayout HorizontalOptions="Start" VerticalOptions="End" BackgroundColor="Aqua" Orientation="Vertical">
<Label x:Name="AdditionalDescription" Text="{Binding AdditionalText}" TextColor="{x:Static local:AppColors.AppBackground}" VerticalOptions="End" HorizontalOptions="Start" XAlign="End" YAlign="End" Font="32" />
<Label x:Name="Description" Text="{Binding Text}" TextColor="{x:Static local:AppColors.AppBackground}" VerticalOptions="End" HorizontalOptions="Start" XAlign="End" YAlign="End" Font="Bold, 32" />
</StackLayout>
</Grid>
</ContentView.Content>
有什么技巧可以让 Inner Stacklayout 与底部对齐吗? 当我使用控件时,控件具有预期的大小(填充整个可用空间),但内部堆栈布局与顶部对齐。 :(
【问题讨论】:
-
有没有人在生产中使用 Xamarin.Forms?在当前状态下似乎非常有问题! :(
标签: xamarin.forms