title: Error while binding image source in DataTemplate
body: <p>I have an <code>ItemsControl</code> with a Canvas that should show my images. I have an <code>ObservableCollection</code> with objects of a class with propoties: </p>
  
  <pre><code>Image Image;
  double X;
  double Y;
  </code></pre>
  
  <p>My XAML contains the following code:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;ItemsControl ItemsSource="{Binding Images}"&gt;
      &lt;ItemsControl.ItemsPanel&gt;
          &lt;ItemsPanelTemplate&gt;
              &lt;Canvas AllowDrop="True" Drop="Canvas_Drop_1" MouseDown="canvas_MouseDown_1" Background="{StaticResource LightColor}" Name="canvas" &gt;
              &lt;/Canvas&gt;
          &lt;/ItemsPanelTemplate&gt;
      &lt;/ItemsControl.ItemsPanel&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Image Source="{Binding Image}"/&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
      &lt;ItemsControl.ItemContainerStyle&gt;
          &lt;Style&gt;
              &lt;Setter Property="Canvas.Top" Value="{Binding Y}" /&gt;
              &lt;Setter Property="Canvas.Left" Value="{Binding X}" /&gt;
          &lt;/Style&gt;
      &lt;/ItemsControl.ItemContainerStyle&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>where <code>Images</code> is my <code>ObservableCollection</code>.
  Now the problem is that I cannot bind an <code>Image</code> from that collection to an <code>ImageSource</code> in a <code>DataTemplate</code>. If I do it as I wrote, I'm getting an error:</p>
  
  <blockquote>
    <p>System.Windows.Data Error: 1 : Cannot create default converter to perform 'one-way' conversions between types 'System.Windows.Controls.Image' and 'System.Windows.Media.ImageSource'. Consider using Converter property of Binding. BindingExpression:Path=Image; DataItem='ImageItemViewModel' (HashCode=7670737); target element is 'Image' (Name=''); target property is 'Source' (type 'ImageSource')</p>
    
    <p>System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='System.Windows.Controls.Image' BindingExpression:Path=Image; DataItem='ImageItemViewModel' (HashCode=7670737); target element is 'Image' (Name=''); target property is 'Source' (type 'ImageSource')</p>
  </blockquote>
  
  <p>It works when I put:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;Image Source="{Binding Image.Source}"/&gt;
  </code></pre>
  
  <p>instead of</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;Image Source="{Binding Image}"/&gt;
  </code></pre>
  
  <p>but then I'm losing all image's properties that it has (like effects etc).</p>
  
  <p>So the question is: How can I put there the whole <code>Image</code> object that I have in my collection object instead of binding just its source?</p>