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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:30:42+00:00 2026-06-18T18:30:42+00:00

I want to put images in my ListBox using Binding. Below is the object

  • 0

I want to put images in my ListBox using Binding.

Below is the object containing the URI’s:

_roomView.Room = new Room
        {
            Items = new List<Item> {
            new Item {ItemType = ItemType.BlueKey, ImageUri = "/Escape;component/Images/Items/a.jpg"},
            new Item {ItemType = ItemType.Bracelet, ImageUri = "/Escape;component/Images/Items/b.png"},
            new Item {ItemType = ItemType.Money, ImageUri = "/Escape;component/Images/Items/b.png"}}
        };
        DataContext = _roomView;

Below is the XML:

  <ListBox x:Name="Mylist">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Margin="5">
                        <Image Source="{Binding Room.Items.ImageUri}" Stretch="None" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

The images aren’t showing.

Can anyone see where I am going wrong?

  • 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-18T18:30:44+00:00Added an answer on June 18, 2026 at 6:30 pm

    If image doesn’t show
    – check pathes;
    For example my code for binding

     public class Country
    {       
        public String name
        {
            get;
            set;
        }       
        public String Flag
        {
            get
            {
                return "/Image/Countries/" + name + ".png";
            }
        }
    }
    
    
    <Image Width="100" Height="140" HorizontalAlignment="Left" Stretch="UniformToFill">
        <Image.Source>
           <BitmapImage UriSource="{Binding Flag}" CreateOptions="BackgroundCreation" />
        </Image.Source>
    </Image>   
    

    If You are using images from the project be sure that thay Build to content and copy always to output directory.(properties of the images )

    By the way if you want to show images from the Internet You need to use LowProfileImageLoader
    You can read more about it
    http://blogs.msdn.com/b/delay/archive/2010/09/02/keep-a-low-profile-lowprofileimageloader-helps-the-windows-phone-7-ui-thread-stay-responsive-by-loading-images-in-the-background.aspx

     <Image  delay:LowProfileImageLoader.UriSource= "{Binding Flag}" HorizontalAlignment="Left" Stretch="Fill"   VerticalAlignment="Center" Width="24" Height="16" Margin="0,0,10,0"  />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a StackPanel containing five images and I want to put a black
I want to put an gridview with images inside an expandable list...I've already make
I want to put some images in an area at the application start. As
a I have some images on page and I want to put <span> tag
I'm trying to put together an image uploader. I want to upload images into
I have a horizontal list used as a nav, where I want to put
I want to put my images to db but i want to have a
I have two images, both with alpha channels. I want to put one image
I want to put 8 image thumbs in one horizontal line, using the whole
I want to put two images together (a nine-patch image with icon), So that

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.