Rick
Topic Author
Posts: 50
Joined: 26 Nov 2013, 15:35

Blend paths vs build tool

30 Apr 2015, 21:44

In Blend I made a folder called Images. I place all my images in there and all my xaml reference Images/myimage.png.

When I run this through the Build Tool I get an error on the xaml saying:

Parsing Image.Source
Image 'Images/Images/myimage.png' not found.

Why is the BuildTool attaching another Images in the path? If I alter the xaml to not have Images in the path the Build Tool works but then of course Blend doesn't.
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: Blend paths vs build tool

30 Apr 2015, 22:11

Could you please post the <Image Source="???"/> that Blend is generating?
And also the exact file structure (where the .csproj, the xaml file, and the image are placed).

Thanks.
 
Rick
Topic Author
Posts: 50
Joined: 26 Nov 2013, 15:35

Re: Blend paths vs build tool

30 Apr 2015, 22:29

I have ImageBrush's:
<Grid x:Name="MasterGrid" Margin="0,0,0,5">
		<Grid.Resources>
			<ImageBrush x:Key="rifle" ImageSource="items.png" Stretch="Fill" ViewboxUnits="Absolute" Viewbox="0,0,256,64"/>
			<ImageBrush x:Key="water_bottle" ImageSource="items.png" Stretch="Fill" ViewboxUnits="Absolute" Viewbox="0,384,64,64"/>
		</Grid.Resources>

My Blend structure is just:

Visual Studio 2013->Projects->HUD->HUD->Images
Visual Studio 2013->Projects->HUD->HUD->bin
etc
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: Blend paths vs build tool

06 May 2015, 01:28

Assuming you are working with 1.2 version, I tried the following sample:
HUD/HUD/test.xaml
<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid x:Name="MasterGrid" Margin="0,0,0,5">
        <Grid.Resources>
            <ImageBrush x:Key="rifle" ImageSource="Images/items.png" Stretch="Fill"
                ViewboxUnits="Absolute" Viewbox="0,0,256,64"/>
        </Grid.Resources>
        <Rectangle Width="256" Height="64" Fill="{StaticResource rifle}"/>
    </Grid>
</Grid>
With the image placed at HUD/HUD/Images/items.png.

And calling BuildTool as follows:
> NoesisGUI-SDK-win\Bin\Resource.BuildTool.exe HUD\HUD\test.xaml --outdir HUD\HUD\bin\NoesisGUI --deps
It builds the xaml correctly, and as I also specified the --deps option, it builds the image too.

Are you doing anything different?

Who is online

Users browsing this forum: No registered users and 2 guests