XFC0045 Binding: Property "Tittle" not found on "Page_Navigation.ViewModels.ThirdPageViewModel". Error getting from this area - Page_Navigation\Views\ThirdPage.xaml
using Xamarin.Forms;
namespace Page_Navigation.ViewModels
{
public class ThirdPageViewModel : BindableObject
{
public ObservableCollection<Matches> MatchesList { get; set; }
public ThirdPageViewModel()
{
MatchesList = new ObservableCollection<Matches>();
MatchesList.Add(new Matches { Tittle = "Tittle 1", Description = "Description 1" });
MatchesList.Add(new Matches { Tittle = "Tittle 2", Description = "Description 2" });
MatchesList.Add(new Matches { Tittle = "Tittle 3", Description = "Description 3" });
MatchesList.Add(new Matches { Tittle = "Tittle 4", Description = "Description 4" });
}
}
public class Matches
{
public string Tittle { get; set; }
public string Description { get; set; }
}
}
<?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:VM="clr-namespace:Page_Navigation.ViewModels"
x:DataType="VM:ThirdPageViewModel"
x:Class="Page_Navigation.Views.ThirdPage"
NavigationPage.HasNavigationBar="True"
NavigationPage.HasBackButton="True"
Title="Third Page">
<ContentPage.BindingContext>
<VM:ThirdPageViewModel/>
</ContentPage.BindingContext>
<ContentPage.Content>
<ListView ItemsSource="{Binding MatchesList}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<Label Text="{Binding Tittle}"/>
<Label Text="{Binding Description}"/>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentPage.Content>
</ContentPage>
I don't know why this exception. I am using VS2019 and Xamarin.forms 4.8.0.1451
x:DataType...
from content page declaration and build again.