My application is in VS2010,Silverlight and coded in C#.Net.
My requirement is i want to upload Image in my Imagebox control.As there is no PictureBox control in Silverlight im using ImageBox.
I have a Imagebox,below that a Browse button.
When the User clicks on Browse button,Dialogbox should open and when the USer selects a Image it should be loaded to Image box..
Example for Picturebox is available on the forum but i want it for Imagebox.
Below is my code.
OpenFileDialog imageDialog = new OpenFileDialog();
//Filter default filetype to be allowed for selection
imageDialog.Filter = "Pictures (*.jpg)|*.jpg";
imageDialog.FilterIndex = 1;
//Allows multiple files to be selected
imageDialog.Multiselect = true;
//Call the ShowDialog method to show the dialog box
bool? userClickedOK = imageDialog.ShowDialog();
//Process input if the user clicked OK
if (userClickedOK == true)
image1 is my image control
Please correct me in image1.Source=.....