title: Windows phone 8 DataTemplate in XAML not showing data
body: <p>I would like to display some information in a data template in my app but when it is run it shows nothing in the listbox.</p>
  
  <p>Here is the class code (class called notes)</p>
  
  <pre><code>public class notes
  {
      public string strNoteName { get; set; }
      public string strCreated { get; set; }
      public string strModified { get; set; }
      public bool boolIsProtected { get; set; }
      public string strNoteImage { get; set; }
  
      public static ObservableCollection&lt;notes&gt; GetnotesRecord()
      {
          ObservableCollection&lt;notes&gt; notesRecord = new ObservableCollection&lt;notes&gt;  
         {  
             new notes{strNoteName="Science",strCreated="17/07/2014",strModified="17/07/2014",boolIsProtected=true,strNoteImage=""},  
             new notes{strNoteName="Math",strCreated="12/02/2014",strModified="15/07/2014",boolIsProtected=false,strNoteImage=""},  
             new notes{strNoteName="HW",strCreated="05/06/2014",strModified="2/07/2014",boolIsProtected=false,strNoteImage=""},  
             new notes{strNoteName="Business",strCreated="23/04/2014",strModified="17/07/2014",boolIsProtected=true,strNoteImage=""},
  
         };
          return notesRecord;
      }
  
      public ObservableCollection&lt;notes&gt; _notes;
      public ObservableCollection&lt;notes&gt; allNotes
      {
          get
          {
              return _notes;
          }
          set
          {
              _notes = value;
  
          }
      }    
  
  }
  </code></pre>
  
  <p>And here is the XAML code:</p>
  
  <pre><code>&lt;ListBox Margin="0,10,0,88"&gt;
                  &lt;ListBox.ItemTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;StackPanel Orientation="Horizontal"&gt;
                              &lt;Grid Margin="0,5,0,0"&gt;
                                  &lt;Grid.ColumnDefinitions&gt;
                                      &lt;ColumnDefinition Width="auto"&gt;&lt;/ColumnDefinition&gt;
                                      &lt;ColumnDefinition&gt;&lt;/ColumnDefinition&gt;
                                  &lt;/Grid.ColumnDefinitions&gt;
                                  &lt;Image Source="{Binding strNoteImage}" Height="80" Width="80" Grid.Column="0"&gt;&lt;/Image&gt;
                                  &lt;StackPanel Grid.Column="1" Orientation="Vertical" Width="150" Height="100" &gt;
                                      &lt;TextBlock Text="{Binding strNoteName}" Margin="5,1,0,1"&gt;&lt;/TextBlock&gt;
                                      &lt;TextBlock Text="{Binding strCreated}" Margin="5,1,0,1"&gt;&lt;/TextBlock&gt;
                                      &lt;StackPanel Orientation="Horizontal"&gt;
                                          &lt;TextBlock Text="Last modified: " Margin="5,1,0,1"&gt;&lt;/TextBlock&gt;
                                          &lt;TextBlock Text="{Binding strModified}" Margin="3,1,0,1"&gt;&lt;/TextBlock&gt;
                                      &lt;/StackPanel&gt;
                                      &lt;StackPanel Orientation="Horizontal"&gt;
                                          &lt;TextBlock Text="Is protected: " Margin="5,1,0,1"&gt;&lt;/TextBlock&gt;
                                          &lt;TextBlock Text="{Binding boolIsProtected}" Margin="3,1,0,1"&gt;&lt;/TextBlock&gt;
                                      &lt;/StackPanel&gt;
                                  &lt;/StackPanel&gt;
  
                              &lt;/Grid&gt;
  
                          &lt;/StackPanel&gt;
  
  
                      &lt;/DataTemplate&gt;
                  &lt;/ListBox.ItemTemplate&gt;
              &lt;/ListBox  &gt;
  </code></pre>
  
  <p>Thank you in advance for any help :)</p>