title: Drag and Drop In WPF C#
body: <p>following is my code for drag and drop in wpf. i used the same code in windowform for drag and drop images but i does not seem to work for wpf Can you help ?</p>
  
  <pre><code> &lt;Image Height="464" Name="PictureBox" Stretch="Uniform" Width="769"  AllowDrop="True" DragEnter="PictureBox_DragEnter" Drop="PictureBox_Drop" /&gt;
  
  
       private void PictureBox_DragEnter(object sender, DragEventArgs e)
  
      {
          if (e.Data.GetDataPresent(DataFormats.Bitmap, false) == true)
              e.Effects = DragDropEffects.None;
      }
  
      private void PictureBox_Drop(object sender, DragEventArgs e)
      {
          string[] files = (string[])e.Data.GetData(DataFormats.Bitmap);
          // images is (arraylist for multi pictures.
          if (images == null)
              images = new ArrayList();
          for (int i = 0; i &lt; files.Length; i++)
          {
              BitmapImage bitmap = new BitmapImage();
              bitmap.BeginInit();
              bitmap.UriSource = new Uri(files[i]);
              bitmap.EndInit();
              images.Add(bitmap);               
          }
          currentPicture = images.Count;
          btn_Next_Click(sender, e);
          MessageBox.Show("images " + images.Count);
      }
  </code></pre>