Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
how to
Upload Image or text file in particular folder in WPF Browser Application.
Posted
Updated 23-Jun-22 21:05pm

go through the below link , this may helps you
Here[^]
 
Share this answer
 
hey! your question is little bit confusing for me. what do mean by upload Image. from where to where you want to upload image or texts. please be more specific while asking question, whatever you can go through given article to learn how to use Upload control in WPF.
File Upload Custom Control in WPF[^]
 
Share this answer
 
Comments
DhavalRana 25-Dec-11 22:25pm    
this is smiple question about upload file problem in wpf... "how to upload file?"
 
Share this answer
 
v2
XML
<Button Name = "Browse" Click = "Browse_CLick"/> // Specify width and height for button and image viewer
<StackPanel>
<Image Name = "ImageViewer1"/>
</StackPanel>





C#
C#
private void Browse_Click(object sender, RoutedEventArgs e)
{
System.Windows.Forms.OpenFileDialog ofd = new System.Windows.Forms.OpenFileDialog(); 
                ofd.Filter = "Image files (*.png;*.jpeg;*.jpg)|*.png;*.jpeg;*.jpg"; // Specify the types of images which can be picked
                if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
ImageViewer1.Source = odf.FileName;
}
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900