1
Reply

How to Display image from network in wpf

muhsin muhsin

muhsin muhsin

14y
2.6k
0
Reply

    Hi.....

    I have two  computers connected in peer to peer

    one computer named 'City' has a shared folder called 'Photos'

    I was able to send Image from another computer to city using

     

    File.copy("MyPhoto.jpg","\\City\Photos\MyPhoto.jpg",true);

    I tried to display this image From Photos folder as follow

    BitmapImage DriverPhoto=new BitmapImage();

    DriverPhoto.BeginInit();

    DriverPhoto.UriSource =new Uri("\\City\Photos\MyPhoto.jpg");   /////// I get Exception Here

    DriverPhoto.EndInit();

    DriverImageControl.Source=DriverPhoto;

    can anyone explain to me how to set Uri path correctly?

    thanks