Click here to Skip to main content
15,897,519 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to open a image file in wpf
Posted

C#
string s = "jagananth.jpg";
            string selectedFileName = System.IO.Path.Combine(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "image"), System.IO.Path.GetFileName(s));
            image1.Source = new BitmapImage(new Uri(selectedFileName, UriKind.Absolute));
 
Share this answer
 
v2
Here, following article should explain all: WPF Image Viewer[^]
 
Share this answer
 
 
Share this answer
 

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