title: WPF Image source binding is not working
body: <p>I have a WPF application which used <code>LinqToTwitter</code> as data source for a <code>ListBox</code>. The data that is rendered inside the <code>DataTemplate</code> comes from the twitter source which has a text and image.</p>
  
  <p><code>SocialFeedView.xaml</code> code</p>
  
  <pre><code>&lt;DockPanel Grid.Row="0" Background="#1da1f2"&gt;
          &lt;TextBlock Text="#BluesAllDay" VerticalAlignment="Bottom"  FontSize="20" FontWeight="DemiBold" 
                     Foreground="White" HorizontalAlignment="Center"/&gt;
      &lt;/DockPanel&gt;
  
      &lt;StackPanel Grid.Row="1"&gt;
          &lt;ListBox x:Name="TweetList" HorizontalContentAlignment="Stretch"
                   ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding Tweets}"&gt;
              &lt;ListBox.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Grid&gt;
                          &lt;Grid.ColumnDefinitions&gt;
                              &lt;ColumnDefinition Width="Auto"/&gt;
                              &lt;ColumnDefinition Width="*"/&gt;
                          &lt;/Grid.ColumnDefinitions&gt;
  
                          &lt;Image Source="{Binding Image}" Grid.Column="0" Stretch="UniformToFill"
                                 Margin="3" Width="50" Height="50" /&gt;
                          &lt;TextBlock Text="{Binding Text}" Grid.Column="1" TextWrapping="Wrap" FontSize="17"/&gt;
                      &lt;/Grid&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListBox.ItemTemplate&gt;
          &lt;/ListBox&gt;&lt;/StackPanel&gt;
  </code></pre>
  
  <p>This is the underlying code for its view model</p>
  
  <pre><code>private ObservableCollection&lt;Tweet&gt; _tweets;
      public ObservableCollection&lt;Tweet&gt; Tweets
      {
          get
          {
              if (_tweets == null)
              {
                  _tweets = new ObservableCollection&lt;Tweet&gt;();
              }
              return _tweets;
          }
          set { Set(ref _tweets, value, x =&gt; x.Tweets); }
      }
  
      private SingleUserAuthorizer authorizer = new SingleUserAuthorizer
      {
          CredentialStore = new SingleUserInMemoryCredentialStore
          {
              ConsumerKey = "xxxxxxxx",
              ConsumerSecret = "xxxxxxxxxxx",
              AccessToken = "xxxxxxxxxx",
              AccessTokenSecret = "xxxxxxxxxx"
          }
      };
  
      private List&lt;Status&gt; currentTweets;
  
      public SocialFeedViewModel()
      {
          GetMostRecent200HomeTimeLine();
  
          if (Tweets != null) Tweets.Clear();
          currentTweets.ForEach(tweet =&gt; Tweets.Add(new Tweet { Text = tweet.Text, Image = new System.Uri(tweet.User.ProfileImageUrl, UriKind.Absolute) }));
      }
  
      private void GetMostRecent200HomeTimeLine()
      {
          var twitterContext = new TwitterContext(authorizer);
  
          var tweets = from tweet in twitterContext.Status
                       where tweet.Type == StatusType.Home &amp;&amp; tweet.Count == 200
                       select tweet;
  
          if (currentTweets != null) currentTweets.Clear();
  
          currentTweets = tweets.ToList();
      }
  
      public void PullNew200HomeTimeLine()
      {
          GetMostRecent200HomeTimeLine();
  
          if (Tweets != null) Tweets.Clear();
          currentTweets.ForEach(tweet =&gt; Tweets.Add(new Tweet { Text = tweet.Text, Image = new System.Uri(tweet.User.ProfileImageUrl, UriKind.Absolute) }));
      }
  }
  
  public class Tweet
  {
      public string Text { get; set; }
      public Uri Image { get; set; }
  }
  </code></pre>
  
  <p>The binding mechanism of <code>ObservableCollection</code> of type Tweet is working though.  But, one problem is that the <code>&lt;Image Source="{Binding Image}"/&gt;</code> component doesn't show the image from the Tweet. Image class which is of type URI.  </p>
  
  <p>I'm stuck on this, and have run out of options on how to make it work.</p>
  
  <p>This is the <code>ListBox</code> output (the red box should show the <code>ProfileImageUrl</code> retrieved from the Tweets collection)</p>
  
  <p><a href="https://i.stack.imgur.com/DWV54.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DWV54.png" alt="enter image description here"></a></p>
  
  <p>Am I missing something? Any help is greatly appreciated.</p>