Using file-path to images stored within the Application Settings
Posted
by Bill
on Stack Overflow
See other posts from Stack Overflow
or by Bill
Published on 2010-03-27T12:14:17Z
Indexed on
2010/03/27
12:23 UTC
Read the original article
Hit count: 304
I am trying to develop an application that uses a number of images that are stored in a seperate remote file location. The file-paths to the UI elements are stored within the Application Settings. Although I understand how to access and use the file-path from Settings in C# (Properties.Settings.Default.pathToGridImages + "OK.png"), I am at a loss to figure out how to utilize the Settings paths in WPF, and can only seem to access the file if I include the file-path, such as:
<Grid.Background>
<ImageBrush ImageSource="C:\Skins\bottomfill.png" TileMode="Tile" />
</Grid.Background>
I would have thought that concatenating "Properties.Settings.Default.pathToGridImages" with "bottomfill.png" in WPF could be done much like it can be done in C#. Can anyone please point me in the right direction?
© Stack Overflow or respective owner