Click here to Skip to main content
15,867,488 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Drawing Geometries to RenderTargetBitmap is being anti-aliased, can it be turned off ? Pin
sfogarasi16-Oct-09 8:42
sfogarasi16-Oct-09 8:42 
QuestionHow to save files in single DAT file in .NET? Pin
mittalpa15-Oct-09 6:58
mittalpa15-Oct-09 6:58 
AnswerRe: How to save files in single DAT file in .NET? Pin
Mark Salsbery15-Oct-09 7:50
Mark Salsbery15-Oct-09 7:50 
QuestionCan't get UriKind.Relative to work Pin
fjparisIII15-Oct-09 5:41
fjparisIII15-Oct-09 5:41 
AnswerRe: Can't get UriKind.Relative to work Pin
Mark Salsbery15-Oct-09 7:06
Mark Salsbery15-Oct-09 7:06 
GeneralRe: Can't get UriKind.Relative to work Pin
fjparisIII15-Oct-09 8:13
fjparisIII15-Oct-09 8:13 
GeneralRe: Can't get UriKind.Relative to work Pin
Mark Salsbery15-Oct-09 8:17
Mark Salsbery15-Oct-09 8:17 
GeneralRe: Can't get UriKind.Relative to work Pin
fjparisIII15-Oct-09 9:14
fjparisIII15-Oct-09 9:14 
Mark Salsbery wrote:
Your "ResourcePath" contains a valid value for sure?

By this you mean what I've been specifying as Resource/screenshot.png? If so, then yes, it has to be valid, because specifying the absolute URI works. I have these lines in my code so I can easily switch back and forth between absolute and relative URIs:

#if true
            Uri uri = new Uri("pack://application:,,,/" + ResourcePath);
#else
            Uri uri = new Uri(ResourcePath, UriKind.Relative);
#endif

Mark Salsbery wrote:
Also, I would try naming the folder something other than "Resource",
not that I know of any reason why "Resource" shouldn't work...

I tried renaming it to "Screenshots" with the same failure with relative URIs and success with absolute URI. I also tried with and without an initial slash in the relative path.
Mark Salsbery wrote:
Other than that, I'm not sure why it wouldn't be working.

Anyone else have any ideas? Relative URIs is something I've never been able to get working in my 70,000 line WPF app. I've got absolute URI's all over the place to get around the problem. I even defined a global string so I wouldn't have to repeat the "pack://application:,,,/" string in a bunch of different places. There must be some kind of Dev Studio project setting that is causing relative URIs to be interpreted incorrectly.
General[Message Deleted] Pin
fjparisIII15-Oct-09 11:42
fjparisIII15-Oct-09 11:42 
QuestionRe: Can't get UriKind.Relative to work Pin
Mark Salsbery16-Oct-09 7:34
Mark Salsbery16-Oct-09 7:34 
AnswerRe: Can't get UriKind.Relative to work Pin
fjparisIII16-Oct-09 8:43
fjparisIII16-Oct-09 8:43 
GeneralRe: Can't get UriKind.Relative to work Pin
fjparisIII16-Oct-09 8:05
fjparisIII16-Oct-09 8:05 
GeneralRe: Can't get UriKind.Relative to work Pin
Mark Salsbery16-Oct-09 8:53
Mark Salsbery16-Oct-09 8:53 
GeneralRe: Can't get UriKind.Relative to work SOLVED! Pin
fjparisIII16-Oct-09 14:33
fjparisIII16-Oct-09 14:33 
GeneralRe: Can't get UriKind.Relative to work SOLVED! Pin
Mark Salsbery16-Oct-09 14:46
Mark Salsbery16-Oct-09 14:46 
GeneralRe: Can't get UriKind.Relative to work SOLVED! Pin
fjparisIII16-Oct-09 15:38
fjparisIII16-Oct-09 15:38 
QuestionNothing displayed when set a line to DashStyles.Dot Pin
CooperWu15-Oct-09 4:58
CooperWu15-Oct-09 4:58 
AnswerRe: Nothing displayed when set a line to DashStyles.Dot Pin
Mark Salsbery15-Oct-09 8:04
Mark Salsbery15-Oct-09 8:04 
QuestionControl Limitation Pin
Saiyed Alam14-Oct-09 18:39
Saiyed Alam14-Oct-09 18:39 
AnswerRe: Control Limitation Pin
Ian Shlasko15-Oct-09 3:47
Ian Shlasko15-Oct-09 3:47 
QuestionMenuItems not showing properly Pin
Shelby Robertson 14-Oct-09 4:56
Shelby Robertson 14-Oct-09 4:56 
AnswerRe: MenuItems not showing properly Pin
Mark Salsbery14-Oct-09 7:51
Mark Salsbery14-Oct-09 7:51 
GeneralRe: MenuItems not showing properly Pin
Shelby Robertson 14-Oct-09 8:00
Shelby Robertson 14-Oct-09 8:00 
GeneralRe: MenuItems not showing properly Pin
Shelby Robertson 14-Oct-09 13:12
Shelby Robertson 14-Oct-09 13:12 
GeneralRe: MenuItems not showing properly Pin
Mark Salsbery15-Oct-09 7:14
Mark Salsbery15-Oct-09 7:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.