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 4086566
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:44:38+00:00 2026-05-20T18:44:38+00:00

I making simple silverlight application. I need to access and use an image from

  • 0

I making simple silverlight application.

I need to access and use an image from localhost,

I write down my code like this

Book4.Source = new BitmapImage(new Uri(“http://localhost/test/book2.png”, UriKind.Absolute));

It doesn’t make any errors, but It can’t load any image.

//P.S. I didn’t use asp. It is OOB app.

* EDITED: To include additional content for the question.

 public void changeValue_book()
        {
            if (empty_book[3] == true && book_index == 3)
            {
                empty_book[3] = false;
                Book4.Visibility = Visibility.Visible;
                Book3.Visibility = Visibility.Visible;

            Book3.Source = null;
            Book3.Source = new BitmapImage(new Uri("http://localhost/test/book1.png", UriKind.Absolute));
            //Book3.Source = new BitmapImage(new Uri("Resource/책1.png", UriKind.Relative));
        }
        else if (empty_book[4] == true && book_index == 4)
        {
            empty_book[4] = false;
            Book5.Visibility = Visibility.Visible;
            Book4.Visibility = Visibility.Visible;

            Book4.Source = new BitmapImage(new Uri("http://localhost/test/book2.png", UriKind.Absolute));
        }
        else if (empty_book[5] == true && book_index == 5)
        {
        }
    }
  • 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-05-20T18:44:39+00:00Added an answer on May 20, 2026 at 6:44 pm

    If you’re able to access the expected image from your web browser when you navigate to http://localhost/test/book2.png then try the following:

    Uri uri = new Uri("http://localhost/test/book2.png", UriKind.Absolute);
    ImageSource imageSource = new BitmapImage(uri);
    Book4.Source = imageSource;
    

    EDITED

    If you’re images reside on http://localhost/test/yourimagename.png, but your Silverlight application is hosted within an https:// or from the Filesystem you will not be able to load the images at all. The Silverlight Image class and MediaElement class for progressive downloads (media, images, ASX, etc.) are not allowed Cross-scheme access.

    Please see this link for more details:

    http://msdn.microsoft.com/en-us/library/cc189008(v=vs.95).aspx

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

Sidebar

Related Questions

I´m making a simple website to display information from XML file that is created
I am making a simple music playing online app. I would like to make
I am making a simple program which suppose to accept txt file data from
I'm making simple webcam program using OpenCV 2.3 and got stuck by the compile
I'm making simple webcam program using OpenCV 2.3 and got stuck by the runtime
im making a simple TCP client-server in c and im trying to send a
I'm making a simple network using Socket . It works fine but the problem
I am making a simple currency convertor which takes the initial value in a
I'm making a simple one-form Invoice bill printing, below is the screenshot to illustrate
I want to save the state of application on deactivation because some how my

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.