Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - relative filepath for BitmapImage UriSource in Feb CTP

 
 
Old 03-14-2006   #1 (permalink)
bonk


 
 

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]


 
 

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
 

Thread Tools


Similar Threads
Thread Forum
Search doesn't show the filepath General Discussion
filepath/permissions issue? Vista Games
Get the longest filepath ? PowerShell
Bug: Cmdlets using -FilePath should use -Path PowerShell


Vista Forums 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 Ltd

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