Greetings Support members,
I'm facing the same issue although it seems it isn't related to only iPhone X. I've tested both on iOs 7 and 8 and the view is still now being shown, although it works with the vanilla ListView from Xamarin.Forms.
While checking other threads I followed the idea of setting the RadListView within a Grid instead of StackLayout and it also failed to show any data on the page. The code is as shown below.
It's also worth noting that I'm using Xamarin.Forms with .net standard 2.0 (which gives me an alert of Telerik being restored with .net framework 4.6.1 instead of standard 2.0). My Telerik.UI.for.Xamarin is 2017.3.1214.2 and my Xamarin.Forms is 2.5.0.121934. I'm also using Prism library.
XAML:
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
xmlns:prism
=
"clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
prism:ViewModelLocator.AutowireViewModel
=
"True"
x:Class
=
"StudentLoungeApp.Views.HorarioSalaPage"
xmlns:telerikDataControls
=
"clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls"
xmlns:telerikListView
=
"clr-namespace:Telerik.XamarinForms.DataControls.ListView;assembly=Telerik.XamarinForms.DataControls"
xmlns:ios
=
"clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
ios:Page.UseSafeArea
=
"true"
>
<
RelativeLayout
AbsoluteLayout.LayoutBounds
=
"1, 1, 1, 1"
AbsoluteLayout.LayoutFlags
=
"All"
>
<
BoxView
x:Name
=
"banner"
BackgroundColor
=
"{StaticResource magenta_2}"
RelativeLayout.HeightConstraint="{ConstraintExpression
Type
=
RelativeToParent
,
Property
=
Height
,
Factor
=
0
.25}"
RelativeLayout.WidthConstraint="{ConstraintExpression
Type
=
RelativeToParent
,
Property
=
Width
,
Factor
=
1
}" />
<!-- Icone de Notificações -->
<
Grid
RelativeLayout.HeightConstraint="{ConstraintExpression
Type
=
RelativeToParent
,
Property
=
Height
,
Factor
=
0
.25}"
RelativeLayout.WidthConstraint="{ConstraintExpression
Type
=
RelativeToParent
,
Property
=
Width
,
Factor
=
1
}" >
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
Grid
Grid.Column
=
"2"
>
<
Image
Source
=
"alarmbell.png"
HeightRequest
=
"20"
WidthRequest
=
"20"
/>
<
BoxView
x:Name
=
"notificacoes"
BackgroundColor
=
"Transparent"
HeightRequest
=
"200"
WidthRequest
=
"200"
/>
</
Grid
>
</
Grid
>
<
StackLayout
HorizontalOptions
=
"FillAndExpand"
VerticalOptions
=
"FillAndExpand"
Orientation
=
"Horizontal"
RelativeLayout.WidthConstraint="{ConstraintExpression
Type
=
RelativeToParent
,
Property
=
Width
}"
RelativeLayout.YConstraint="{ConstraintExpression
Type
=
RelativeToView
,
ElementName
=
banner
,
Property
=
Height
,
Factor
=
1
,
Constant
=
0
}">
<
telerikDataControls:RadListView
x:Name
=
"listViewAulas"
ItemsSource
=
"{Binding Aulas}"
VerticalOptions
=
"FillAndExpand"
HorizontalOptions
=
"Fill"
SelectionMode
=
"Single"
SelectionGesture
=
"Tap"
ItemTapped
=
"OnItemTapped"
>
<
telerikDataControls:RadListView.ItemTemplate
>
<
DataTemplate
>
<
telerikListView:ListViewTemplateCell
>
<
telerikListView:ListViewTemplateCell.View
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
Grid
Grid.Column
=
"0"
Margin
=
"15"
>
<
Label
FontSize
=
"Small"
Text
=
"{Binding Horario}"
/>
</
Grid
>
<
Grid
Grid.Column
=
"1"
Grid.ColumnSpan
=
"4"
Margin
=
"15"
>
<
StackLayout
Orientation
=
"Vertical"
>
<
Label
FontSize
=
"Medium"
FontAttributes
=
"Bold"
Text
=
"{Binding Disciplina}"
/>
<
Label
Text
=
"{Binding ProfessorSala }"
/>
<
Label
Text
=
"{Binding TemaDaAula}"
/>
</
StackLayout
>
</
Grid
>
</
Grid
>
</
telerikListView:ListViewTemplateCell.View
>
</
telerikListView:ListViewTemplateCell
>
</
DataTemplate
>
</
telerikDataControls:RadListView.ItemTemplate
>
<
telerikDataControls:RadListView.GroupDescriptors
>
<
telerikListView:PropertyGroupDescriptor
PropertyName
=
"Grupo"
/>
</
telerikDataControls:RadListView.GroupDescriptors
>
<
telerikDataControls:RadListView.GroupHeaderTemplate
>
<
DataTemplate
>
<
Grid
BackgroundColor
=
"#C1C1C1"
>
<
Label
Text
=
"{Binding }"
TextColor
=
"#303030"
FontSize
=
"Medium"
HorizontalOptions
=
"Center"
/>
</
Grid
>
</
DataTemplate
>
</
telerikDataControls:RadListView.GroupHeaderTemplate
>
</
telerikDataControls:RadListView
>
</
StackLayout
>
</
RelativeLayout
>
</
ContentPage
>
C#
using
Prism.Navigation;
using
Prism.Services;
using
StudentLoungeApp.Interfaces.AppServices.Aulas;
using
StudentLoungeApp.Models.Entidades.Aula;
using
System.Collections.Generic;
using
System.Collections.ObjectModel;
using
System.Threading.Tasks;
namespace
StudentLoungeApp.ViewModels
{
public
class
HorarioSalaPageViewModel : ViewModelBase
{
private
readonly
IPageDialogService _pageDialogService;
private
readonly
IHorarioSalaAlunoAppService _horarioAulaAlunoAppService;
public
HorarioSalaPageViewModel(INavigationService navigationService,
IPageDialogService pageDialogService,
IHorarioSalaAlunoAppService horarioAulaAlunoAppService)
:
base
(navigationService)
{
_pageDialogService = pageDialogService;
_horarioAulaAlunoAppService = horarioAulaAlunoAppService;
Aulas = Aulas ??
new
ObservableCollection<HorarioAulaAluno>();
}
public
override
async
void
OnNavigatingTo(NavigationParameters parameters)
{
base
.OnNavigatingTo(parameters);
var aulas = await _horarioAulaAlunoAppService.ObterHorarioDoDia();
foreach
(var aula
in
aulas)
{
Aulas.Add(aula);
}
}
private
ObservableCollection<HorarioAulaAluno> _aulas;
public
ObservableCollection<HorarioAulaAluno> Aulas
{
get
{
return
this
._aulas ?? _aulas ; }
set
{ SetProperty(
ref
_aulas, value); }
}
public
async Task ObterDetalhesAula(HorarioAulaAluno model)
{
var navigationParams =
new
NavigationParameters();
navigationParams.Add(
"model"
, model);
await NavigationService.NavigateAsync(
"DetalheAulaAlunoPage"
, navigationParams,
null
,
true
);
}
}
}