我有这个(从例子中复制)...Telerik的日历不会出现
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:MyApp" x:Class="MyApp.MainPage" xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackLayout Padding="5">
<Label Text="Select a view mode" />
<Picker x:Name="viewModePicker" />
</StackLayout>
<telerikInput:RadCalendar x:Name="calendar" NativeControlLoaded="CalendarLoaded" Grid.Row="1"/>
</Grid>
</ContentPage>
而且......
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
calendar.DisplayDate = new DateTime(2017, 4, 12);
viewModePicker.ItemsSource = Enum.GetValues(typeof(CalendarViewMode));
viewModePicker.SelectedItem = CalendarViewMode.Day;
viewModePicker.SelectedIndexChanged += ViewModeChanged;
}
private void ViewModeChanged(object sender, EventArgs e)
{
calendar.TrySetViewMode((CalendarViewMode)viewModePicker.SelectedItem);
}
private void CalendarLoaded(object sender, System.EventArgs e)
{
calendar.TrySetViewMode((CalendarViewMode)viewModePicker.SelectedItem);
}
}
一切工作,包括现有的日历实例,除了我看不到它!我正在使用iOS应用程序。
没有更改我的代码? –
它看起来像你没有'telerikInput'添加到你的xaml文件。此外,很难诊断为什么“它只是没有出现”。看看xamarin日志或设备日志,看看它是否为一个指标,为什么 – heinst
但是,精确的组合xaml和codebehind为我工作,所以我想我会张贴它,看看你是否有不同的结果 – heinst