【发布时间】:2017-04-17 07:21:41
【问题描述】:
我正在使用Xamarin 中的Visual Studio 2015 开发跨平台应用程序。我正在使用XLabs.Forms v2.3.0- pre 05,但我遇到了radio buttons 和checkboxes 的问题。
现在checkboxes 在UWP 上工作正常,但它们不会在iOS 上显示。
UWP 上的单选按钮根本不起作用,而iOS 上仅显示文本
见下图。
这是我的复选框代码:
<ListView x:Name="lv_ReportQuestions">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout
Orientation="Vertical"
>
<StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<StackLayout WidthRequest="{Binding DisplayWidth}">
<Label HorizontalOptions="FillAndExpand" Text="{Binding ItemName}" VerticalOptions="Center" LineBreakMode="WordWrap"/>
</StackLayout>
<controls:CheckBox DefaultText="" WidthRequest="40" IsEnabled="false" IsVisible="true" Checked="true" HorizontalOptions="EndAndExpand"/>
</StackLayout>
<Label HorizontalOptions="FillAndExpand" Text="{Binding SubText}" VerticalOptions="Center"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
这是我的单选按钮代码:
<Label Text="Radio Buttons"/>
<Frame
HorizontalOptions="FillAndExpand"
VerticalOptions="CenterAndExpand"
OutlineColor="#000000"
>
<controls:BindableRadioGroup x:Name="ansPicker"
IsVisible="true"/>
</Frame>
ansPicker.ItemsSource = new[]
{
"Red",
"Blue",
"Green",
"Yellow",
"Orange"
};
我尝试了其他可能的修复方法,但对我没有任何效果。
【问题讨论】:
标签: ios xamarin uwp cross-platform xlabs