Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8442531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:52:04+00:00 2026-06-10T08:52:04+00:00

My understanding is that when I set SL5 to run OOB and elevated trust

  • 0

My understanding is that when I set SL5 to run OOB and elevated trust that I should have wide open access to any directory/file on the local system. If an external system places png image files into the user’s c:\images folder, how can I load the various png files into a XAML Image element?

This line works:

image.UriSource = new Uri(value as string);

if I set value to a string like “http://blah.com/image1.png”

But fails if I try to set it to:

ImageUrl = new Uri(@"C:\images\image3.png")

which gets resolved to something like “file:///C:…..” when it hits the

image.UriSource = new Uri(value as string);

line.

How do I display png files in SL5 from any local path on the system running the OOB elevated app?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:52:05+00:00Added an answer on June 10, 2026 at 8:52 am

    Something like this should work provided that you have elevated permissions set correctly

      var bmp = new BitmapImage();
      var stream = new FileStream(@"c:\dir\folder\image.png", FileMode.Open);
      bmp.SetSource(stream);
      stream.Close();
    

    If you need to use a uri, this should work:

      var bmp = new BitmapImage();      
      var uri = new Uri("c:/dir/folder/image.png");
      bmp.UriSource = uri;
    

    Note that the paths are different. The uri path requires forward slashes to be used.

    You can then set the source of your image control to the bmp

      image.Source = bmp;
    

    If you’re getting a ‘File Operation not permitted’ exception you need to double check that elevated permissions is checked in your out of browser settings

    Project -> Properties -> ‘Out of browser settings’

    Check ‘Require elevated trust…’

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My understanding is that the LinqToSql pseudolanguage describes a set using a syntax very
Old question My understanding is that C# has in some sense HashSet and set
Understanding that I should probably just dig into the source to come up with
It is my understanding that two unequal objects can have the same hashcode. How
It's my understanding that all three of these lines below should return an ARRAY
My understanding is that mime types are set by the web server. Why do
I have an InputStream that is set up to handle local files, but want
It is in my understanding that referencing any DOM element in jQuery via the
I have a comboBox that has a datatrigger that set its SelectedIndex based on
Basically, I was always in the understanding that you should return the expose base

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.