Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

relative filepath for BitmapImage UriSource in Feb CTP

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 03-14-2006   #1 (permalink)
bonk
Guest


 

relative filepath for BitmapImage UriSource in Feb CTP


How do do I specify a relative filepath for an Image suing feb CTP 96 ?
I copied myimage.jpg into the same directory as the exe (bin/Debug and
bin/Release)
and I tried to use the pack syntax as the docs suggest:
<Image>
<Image.Source>
<BitmapImage UriSource="pack://application:,,/myimage.jpg" />
</Image.Source>
</Image>

also I tried
UriSource="myimage.jpg"
In both cases I get a System.IO.Exception, saysing: "cannot locate ressource
myimage.jpg"
what am I doing wrong?



My System SpecsSystem Spec
Old 03-15-2006   #2 (permalink)
Ashish Shetty [MSFT]
Guest


 

Re: relative filepath for BitmapImage UriSource in Feb CTP

For the edification of others curious about the answer here, I've responded
to something similar in the WPF Forum:
http://forums.microsoft.com/MSDN/Sho...97063&SiteID=1

--
Ashish Shetty [MSFT]
Program Manager, Windows Presentation Foundation (Avalon)
Blog: http://nerddawg.blogspot.com
---
This posting is provided "AS IS" with no warranties, and confers no rights.



"bonk" <schwertfischtrombose@gmx.de> wrote in message
news:%23tVcZl2RGHA.2088@TK2MSFTNGP14.phx.gbl...
>
> How do do I specify a relative filepath for an Image suing feb CTP 96 ?
> I copied myimage.jpg into the same directory as the exe (bin/Debug and
> bin/Release)
> and I tried to use the pack syntax as the docs suggest:
> <Image>
> <Image.Source>
> <BitmapImage UriSource="pack://application:,,/myimage.jpg" />
> </Image.Source>
> </Image>
>
> also I tried
> UriSource="myimage.jpg"
> In both cases I get a System.IO.Exception, saysing: "cannot locate
> ressource myimage.jpg"
> what am I doing wrong?
>



My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
filepath/permissions issue? Tom Vista Games 3 08-20-2007 04:48 PM
Creating an BitmapImage from an ImageBrush? scott.browse@gmail.com Avalon 0 08-13-2007 05:46 PM
Get the longest filepath ? KL PowerShell 19 11-26-2006 01:58 PM
Bug: Cmdlets using -FilePath should use -Path Alex K. Angelopoulos [MVP] PowerShell 2 06-20-2006 09:33 AM
BitmapImage and Bitmap (second shot)) Rhinpoche@star-sw.com Avalon 2 05-18-2006 10:55 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51