Use Of Open File Dialog And Image Control in WPF
In this Article.I will Explain You how to use the open file dialog.how to select only image file using this and how to save this images into the database.If you are new to WPF you can also use it.It is just a basic example which introduce you with some basic controls of wpf.
Here I use .net framework 4.0 and sqlserver 20008 R2 in the attachment.If You are not friendly with the script.Then make a database with the name wpf then create a table having two columns one is (name datatype(Varchar(50) and the Second one is photo having datatype image).and Change the Connection String in the ConClass.
First of All take a WPF Application.
Design the window for inserting the name and the image of the student.
For this use textbox and Image control.Here I attach an Attachment for this with the database Script.
In which I Take 3 windows one is mainwindow.xaml which shows only how to use open file dialog control then the second one which is Student Form in which I fill the details of student i.e. its name and image into the database.And In the Third Form I take the list in the combobox in which I fill the name of students from the database and according to the student name their image is come into the image control.
Hope This Article Will be HelpFul For You ...
Open File Dialog and Image Control In WPF
Thanks and Regards
Shalini Rathore