Hi,
My application is in Silverlight,coded in C#.Net in VS2010.
I have a form with a Imagebox and a Browse button below it.
My requirement is when the user clicks on Browse button OpenDialog should be opened and the User should be able to click and select an Image file and when the User selects an Image file than that selected Image should be loaded to the Imagebox.
I have written some code but just facing the problem of Providing the Source to Imagebox.
Below is my Code
01.
OpenFileDialog imageDialog = new OpenFileDialog();
02.
03.
//Filter default filetype to be allowed for selection
04.
.Filter = "Pictures (*.jpg)|*.jpg";
05.
imageDialog.FilterIndex = 1;
06.
07.
//Allows multiple files to be selected
08.
imageDialog.Multiselect = true;
09.
10.
//Call the ShowDialog method to show the dialog box
11.
bool? userClickedOK = imageDialog.ShowDialog();
12.
13.
//Process input if the user clicked OK
14.
15.
if (userClickedOK == true)
16.
{
17.
image1.Source =
18.
}
Please help in the above Code