title: Adding a bitmap image from list to a list
body: <p>I have a <code>ListBox</code> where I want to drop images and display them right after.
  When I do it with a path it works, but when I try to add a bitmap instead, it shows me <code>System.Drawing.Bitmap</code><img src="https://i.imgur.com/7LsEUBm.png" alt=""></p>
  
  <p>To add it there, I get the path and then transform it to byte(I do that because I need to save it in DB).</p>
  
  <p>I do something like this:</p>
  
  <pre><code>Image image1 = Image.FromFile(img);
  byte[] Test = ConvertImageToBinary(image1);
  ImagesList.Add(new ImagesList()
  {
      ImagePath = img,
      Data = ConvertImageToBinary(image1),
      ConvertedData = ConvertBinaryToImage(Test)
  });
  
  listbox.ItemsSource = ImageArray;
  </code></pre>
  
  <p>WPF:</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;ListBox x:Name="listbox" ScrollViewer.VerticalScrollBarVisibility="Visible" Grid.Row="1" VerticalContentAlignment="Top" HorizontalContentAlignment="Stretch"&gt;
          &lt;ListBox.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;WrapPanel Orientation="Vertical" &gt;
                      &lt;Image  Height="100"  Width="100" Stretch="Fill" Source="{Binding ConvertedData}"  /&gt;
                  &lt;/WrapPanel&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListBox.ItemTemplate&gt;
      &lt;/ListBox&gt;
  </code></pre>
  
  <p>I tried to set it as <code>&lt;Image&gt;</code> and as <code>&lt;ContentControl&gt;</code> but neither worked.</p>