none
Silverlight RRS feed

  • General discussion

  • Hello everybody,

    Iam trying to do the IF inside FOREACH

    Iam created drag and Drop application

    So now I want to check if its an image show image if itd a file show file

    here is my code

    private void photoPanel_Drop(object sender, DragEventArgs e)
            {
                photoBorder.BorderBrush = new SolidColorBrush(Colors.Blue);
                IDataObject data = e.Data;
                FileInfo[] files = (FileInfo[])e.Data.GetData(System.Windows.DataFormats.FileDrop);
                //StringBuilder content = new StringBuilder();

                foreach (FileInfo f in files)
                {
            DropFileInfo dropInfo = new DropFileInfo();
                    dropInfo.FileName = f.Name;
                    dropInfo.IconSource = new BitmapImage(new Uri("/DragandDrop;component/Icons/thumbnailCAYTIF4V.jpg", UriKind.Relative));
                    _dropFiles.Add(dropInfo);
                   
                }
            }

    Friday, May 18, 2012 2:51 PM

All replies