I am setting the ImageSource of the ImageBrush of the Background to pictures in a slideshow.
Here is my property in the ViewModel
private ImageSource _CurrentPicture;
public ImageSource CurrentPicture { get { return _CurrentPicture; } set { Set(ref _CurrentPicture, value); } }
Here is the XAML
<ImageBrush Stretch="UniformToFill" ImageSource="{x:Bind ViewModel.CurrentPicture, Mode=OneWay}"/>
When I set the Uri as the ImageSource to a file on one of my local network Servers (TpsNas) it works and displays the picture.
Uri uriAddress = new Uri("file://TpsNas/Photo/Trees.jpg");
CurrentPicture = new BitmapImage(uriAddress);
When I set the Uri to the ImageSource to a localFile on the D: drive it does not work
Uri uriAddress = new Uri("file:D:\\Trees.jpg");
CurrentPicture = new BitmapImage(uriAddress);
What is the difference?