I have a XAML file representing a three-dimensional model with textures.
I want the textures to be read from or in relation to the file.
I am reading a file using XamlReader, so I want the file to be offline.
I place textures using ImageBrush, which ImageSource is the synatx package URI.
When I use the 'siteoforigin' syntax, this only works if the texture file is next to the application. I want it next to Xaml, wherever it is.
I tried setting the current directory to the Xaml directory, but that did not help.
Not using the package syntax does not work, it just searches for a resource with that name.
How do I need to write a Xaml image source (or is there another way to place textures for a diffuse material brush?) So that this will work?
Itay.
source
share