Is there a way to check in code if a resource exists at an Uri such as:
"pack://application:,,,/MyResource.jpg"
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just chop off the pack://application:,,,/ part of the string and do a File.Exists on the remaining part of the path.
Your snippet you posted is pointing to a file that lives in the root of the running application and is called MyResource.jpg.