Hello,
my app is crashing every time it instatiate a ListView. It works great on iOs and Android but crashes on Windows Phone.
This is MyPage.xaml:
<?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:src="clr-namespace:MyApp;assembly=MyApp"
x:Class="MyApp.MyPage">
<Grid RowSpacing="0" ColumnSpacing="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ListView x:Name="list" Grid.Row="0" Grid.Column="0" BackgroundColor="White">
</ListView>
</Grid>
</ContentPage>
and MyPage.xaml.cs
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace MyApp
{
public partial class MyPage : ContentPage
{
public MyPage()
{
InitializeComponent();
}
}
}
As you can see this is pretty straight forward... nonetheless I'm getting this exception:
{System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: childIndex
at System.Windows.Media.VisualTreeHelper.GetChild(DependencyObject reference, Int32 childIndex)
at Xamarin.Forms.Platform.WinPhone.FixedLongListSelector.OnLoaded(Object sender, RoutedEventArgs routedEventArgs)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)} System.Exception {System.ArgumentOutOfRangeException}
Anybody got any idea why I'm facing this error?
THX!