Tile brush ImageSource is packed by default; how to change this behavior? RRS feed

  • Question

  • hi,

    in a wpf+sketchflow project, when i add a particular image to the background by setting the ImageSource property of the Tile Brush, the image always ends up packed (i.e., pack://siteoforigin:,,,/Images/background.png).  i've tried editing the xaml code to change the ImageSource reference to just "Images/background.png", which is how all the other images i use appear (e.g., for backgrounds of buttons).  i've also tried various combinations of undefining the background, restarting blend and editing the xml outside of blend.

    the problem that this causes is the following:  after i build the project, blend can no longer find and display the image in the artboard. the innermost exception is, "DirectoryNotFoundException:  Could not find a part of the path 'c:\Program Files\Microsoft Expression\Blend 4\Images\background.png'."  the image shows up in the Media Assets of the project, but the reference incorrectly includes the path to the blend install, not the project directory in which the image resides.  i can reset the reference to be "Images\background.png", but the reference always changes back automatically to the "pack://..." formulation.

    what's going on, and what can i do to have the ImageSource reference stick as "Images/background.png", please?

    thanks for any comments or advice!



    Thursday, June 16, 2011 6:49 PM