Quantcast
Channel: User Just code - Stack Overflow
Viewing all articles
Browse latest Browse all 41

How to get file path from folder wpf?

$
0
0

I am having an issue, I am developing a WPF application where I have one page named as "help" having one button go When user clicks on this button I have to provide pdf file to the user which is in the help folder.Now my problem is if I write path like this

**string pdfurl1 = ((@"D:\addnkit\projects\wdine\widdne_working\Wdine Us\Wddine\Wine\Help\Emerald Wine Dispensing Software.pdf"));                    System.Diagnostics.Process.Start(pdfurl1);**

Its working successfully

but I know this will not going to work in other pcs so I want to know how can I write code for the same that can be run on any pcs

I have also tried like this

(@"pack://application:,,,/Widne;component/help/mypdf.pdf"

But its not working

[Updated]

I have tried all the solutions but its not working yet I don't know why?please check once againWidne >> Help >> mypdf

enter image description here


Viewing all articles
Browse latest Browse all 41

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>