title: items of a listview are not being displayed in wpf
body: <p>I am trying to add items to a listview where each item has two textblocks, but for some reason items are not being displayed .Here is my XAML code .</p>
  
  <pre><code>&lt;Window x:Class="testapp.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="524" Width="856"&gt;
  &lt;Grid Background="Black"&gt;
      &lt;!--&lt;Image Height="44" HorizontalAlignment="Left" Margin="284,0,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="229" Source="/testapp;component/Images/Picture1.png" /&gt;--&gt;
      &lt;Grid Height="431" HorizontalAlignment="Left" Margin="0,55,0,0" Name="grid1" VerticalAlignment="Top" Width="266" Background="Black" Opacity="0"&gt;
          &lt;ListView  Height="430" HorizontalAlignment="Left" Margin="3,1,0,0" x:Name="listView1" VerticalAlignment="Top" Width="260" &gt;
              &lt;ListView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;WrapPanel&gt;
                          &lt;TextBlock Text="{Binding Name}" Foreground="Green" /&gt;
                          &lt;TextBlock Text="{Binding Source}" Foreground="Green" /&gt;
                      &lt;/WrapPanel&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListView.ItemTemplate&gt;
             &lt;!-- &lt;ListView.ItemsPanel&gt;
                  &lt;ItemsPanelTemplate&gt;
                      &lt;StackPanel Orientation="Horizontal" /&gt;
                  &lt;/ItemsPanelTemplate&gt;
              &lt;/ListView.ItemsPanel&gt;--&gt;
          &lt;/ListView&gt;
  
      &lt;/Grid&gt;
  &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>And here is  my C# code </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Windows;
  using System.Windows.Controls;
  using System.Windows.Data;
  using System.Windows.Documents;
  using System.Windows.Input;
  using System.Windows.Media;
  using System.Windows.Media.Imaging;
  using System.Windows.Navigation;
  using System.Windows.Shapes;
  
  namespace testapp
  {
  
  public partial class MainWindow : Window
  {
      public MainWindow()
      {
          InitializeComponent();
          List&lt;MyItems&gt; items = new List&lt;MyItems&gt;();
          items.Add(new MyItems() { Name = "House Party", Source = " DLNA" });
          items.Add(new MyItems() { Name = "Outdoor Party", Source = " DLNA" });
          listView1.ItemsSource = items;
  
  
      }
  
  
  }
  
  public class MyItems
  {
      public String Name { get; set; }
      public String Source { get; set; }
  
  }
  }
  </code></pre>
  
  <p>Even though i am binding textblocks to name and source it is still not displaying.Can anyone help me? Thanks in advance.</p>