I would like to use path to image from program resources instead of using full path from windows.
tlo.Fill = new ImageBrush
{
ImageSource = new BitmapImage(new Uri(@"D:\Willie\Documents\ColorTester\ColorTester\Resources\1.jpg", UriKind.Absolute))
};
I want to use path like this:
ImageSource = new BitmapImage(new Uri("ColorTester.Resources.1.jpg"));
Can anyone help me with this, because when I try to use it, visual studio throws and exception "System.UriFormatException"?