title: UWP: Invalid Binding Path : Property not found on type DataTemplate
body: <p>I'm building my first <strong>UWP</strong> application, i've been with WPF for some time,
  I'm trying to bind a <strong>Listview itemsSource</strong> but i keep getting the next error:</p>
  <ul>
  <li>Invalid binding path 'Fletes' : Property 'Fletes' not found on type 'DataTemplate'.</li>
  </ul>
  <p>I've tried</p>
  <pre><code> &lt;ListView ItemsSource ={Binding Viewmodel.Fletes}/&gt; 
  </code></pre>
  <p>in xaml, removing <code>x:DataType</code></p>
  <p>and
  using <code>this.DataContext = ViewModel</code> on .cs</p>
  <p>Here's my code:</p>
  <p><strong>Views/HomeFletes.xaml.cs</strong></p>
  <pre><code>namespace Internal.Views
  {
      public sealed partial class HomeFletes : Page
      {
          public FletesViewModel ViewModel { get; set; }
          public HomeFletes()
          {
              this.InitializeComponent();
              this.ViewModel = new FletesViewModel();
          }
  
  
          private void MasterDetailsView_Loaded(object sender, RoutedEventArgs e)
          {
              Console.Write(&quot;loaded&quot;);
          }
      }
  }
  </code></pre>
  <p><strong>Views/HomeFletes.xaml</strong></p>
  <pre><code>&lt;Page
      x:Class=&quot;Internal.Views.HomeFletes&quot;
      xmlns:local=&quot;using:Internal&quot;
      xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
      xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
      xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;
      xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;
      xmlns:model=&quot;using:Internal.Models&quot;
      xmlns:controls=&quot;using:Microsoft.Toolkit.Uwp.UI.Controls&quot;
      mc:Ignorable=&quot;d&quot;
      Background=&quot;{ThemeResource ApplicationPageBackgroundThemeBrush}&quot;&gt;
      &lt;controls:MasterDetailsView
          Loaded=&quot;MasterDetailsView_Loaded&quot;
          CompactModeThresholdWidth=&quot;720&quot;&gt;
          &lt;controls:MasterDetailsView.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;ListView ItemsSource=&quot;{x:Bind ViewModel.Fletes}&quot;&gt;
                      &lt;ListView.ItemTemplate&gt;
                          &lt;DataTemplate  x:DataType=&quot;model:Flete&quot;&gt;
                              &lt;RelativePanel Margin=&quot;24&quot;&gt;
                                  &lt;StackPanel Height=&quot;100&quot; Width=&quot;100&quot; Background=&quot;OrangeRed&quot;&gt;
                                      &lt;TextBlock Text=&quot;{x:Bind Path=Transporte}&quot;/&gt;
                                      &lt;TextBlock Text=&quot;{x:Bind Path=Comentario}&quot; x:Phase=&quot;2&quot;/&gt;
                                  &lt;/StackPanel&gt;
                                 
                              &lt;/RelativePanel&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/ListView.ItemTemplate&gt;
                  &lt;/ListView&gt;
              &lt;/DataTemplate&gt;
          &lt;/controls:MasterDetailsView.ItemTemplate&gt;
      &lt;/controls:MasterDetailsView&gt;
  &lt;/Page&gt;
  </code></pre>
  <p><strong>/ViewModels/FletesViewModel.cs</strong></p>
  <pre><code>namespace Internal.ViewModels
  {
      public class FletesViewModel : BindableBase
      { 
          private ObservableCollection&lt;Flete&gt; fletes = new ObservableCollection&lt;Flete&gt;();
          public ObservableCollection&lt;Flete&gt; Fletes { get { return this.fletes; } }
  
          public FletesViewModel()
          {
              this.fletes.Add(new Flete() { Transporte = &quot;Transporte #1&quot;, Fecha = DateTime.Now, Comentario = &quot;Este es el comentario #1&quot; });
              this.fletes.Add(new Flete() { Transporte = &quot;Transporte #2&quot;, Fecha = DateTime.Now, Comentario = &quot;Este es el comentario #2&quot; });
              this.fletes.Add(new Flete() { Transporte = &quot;Transporte #3&quot;, Fecha = DateTime.Now, Comentario = &quot;Este es el comentario #3&quot; });
              this.fletes.Add(new Flete() { Transporte = &quot;Transporte #4&quot;, Fecha = DateTime.Now, Comentario = &quot;Este es el comentario #4&quot; });
          }
  
  
      }
  }
  </code></pre>
  <p><strong>/Models/Flete.cs</strong></p>
  <pre><code>    namespace Internal.Models
  {
      public class Flete : INotifyPropertyChanged
      {
          public string Transporte { get; set; }
          public DateTime Fecha { get; set; }
          public string Comentario { get; set; }
  
          public event PropertyChangedEventHandler PropertyChanged;
          public void OnPropertyChanged([CallerMemberName] string propertyName = null)
          {
              PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
          }
      }
  }
  </code></pre>