0

I just started with WPF and just now worked with open file dialog to display single image and worked perfect.

This is for single Image:

        Dim ofdlg As New Microsoft.Win32.OpenFileDialog
        If ofdlg.ShowDialog.Value Then
            Image1.Source = New BitmapImage(New Uri(ofdlg.FileName, UriKind.Absolute))
        End If

1.Now I need to display multiple images using folder browser dialog. And which control I need to be used to do display multiple images and how do I do that?

2.I have worked with winforms and I have a user control and I am trying to import that control in the WPF application and it's giving me an error stating that It cannot be placed on to the tool box. So what do I need to do in order to place a winform user control?

coder
  • 13,002
  • 31
  • 112
  • 214

1 Answers1

1

1) I don't quite understand your requirements in the first question. Please add some more details or may be an image of the required layout.

2) To host a Win Forms control in WPF, try following article on MSDN:

Walkthrough: Hosting a Windows Forms Composite Control in WPF

Community
  • 1
  • 1
decyclone
  • 30,394
  • 6
  • 63
  • 80
  • @decyclone-Thanks for the info actually I am just going through some questions and found a part of my first question I asked and it was just to display a folder dialog and here I have got some answer for that http://stackoverflow.com/questions/315164/how-to-use-a-folderbrowserdialog-from-a-wpf-application and after selecting bulk images from that folder I need to display all the Images on a control as In winforms we can use flow layout panel or list view .So I would like to know in wpf which control do I need use to display those Images? – coder Dec 28 '11 at 20:49
  • @Kiran: It is very easy to do that in WPF. Use and `ItemsControl` with a custom `ItemTemplate`. – decyclone Dec 28 '11 at 21:00
  • @decyclone-Thanks for the clarification. – coder Dec 28 '11 at 21:06