I need to set image source dynamically, please note my image is in somewhere on the Network, here is my code
BitmapImage logo = new BitmapImage(); logo.Begin
The pack syntax you are using here is for an image that is contained as a Resource within your application, not for a loose file in the file system.
You simply want to pass the actual path to the UriSource:
logo.UriSource = new Uri(@"\\myserver\folder1\Customer Data\sample.png");