Edit path of image file in Image viewer in C# / XAML -


i using below code :

string filepath = e.fullpath; image.source = new bitmapimage(new uri(filepath)); 

filepath output is:

file:///c://folder//location//name.jpg 

which throwing error image.source

required path format image :

c:/folder/location/name.jpg 

please help,

thank in advance

try this:

string filepath = e.fullpath; image.source = new bitmapimage(new uri(filepath).localpath); 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -