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

  • Home
  • SEARCH
  • 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 6062195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:01:25+00:00 2026-05-23T09:01:25+00:00

Hi i am currently retrieving multiple images from isolated storage. When i retrieve the

  • 0

Hi i am currently retrieving multiple images from isolated storage.
When i retrieve the image in the listbox1 all the image are joined one after another is it possible to have a line break in between each image?? Below will be my retrieve code and save code of the image to and from isolated storage.

Save code:

    private void SaveToLocalStorage(string imageFolder, string imageFileName)
    {
        imageFileName = App.imagePath;

        var isf = IsolatedStorageFile.GetUserStoreForApplication();
        if (!isf.DirectoryExists(imageFolder))
        {
            isf.CreateDirectory(imageFolder);
        }

        string filePath = Path.Combine(imageFolder, imageFileName);
        using (var stream = isf.CreateFile(filePath))
        {
            var bmp = new WriteableBitmap(inkCanvas, inkCanvas.RenderTransform);
            bmp.SaveJpeg(stream, bmp.PixelWidth, bmp.PixelHeight, 0, 100);
        }
        MessageBox.Show(filePath            }

Retrieve code:

private void LoadFromLocalStorage(string imageFolder)
{
    var isoFile = IsolatedStorageFile.GetUserStoreForApplication();

    // Check if directory exists
    if(!isoFile.DirectoryExists(imageFolder))
    {
        throw new Exception("Image directory not found");
    }

    // Clear listbox
    listBox1.Items.Clear();

    // Get files
    foreach(string fileName in isoFile.GetFileNames())
    {
        string filePath = Path.Combine(imageFolder, fileName);
        using(var imageStream = isoFile.OpenFile(filePath, FileMode.Open, FileAccess.Read))
        {
            var imageSource = PictureDecoder.DecodeJpeg(imageStream);

            BitmapImage bi = new BitmapImage();

            ListBoxItem item = new ListBoxItem();
            bi.SetSource(imageStream);
            item.Content = new Image() { Source = bi, MaxHeight = 100, MaxWidth = 100 };
            listBox1.Items.Add(item);
        }
    }
}

Can anyone help me with how should i go about doing the line break in listbox1.
Appreciate all of your help.

  • 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-23T09:01:26+00:00Added an answer on May 23, 2026 at 9:01 am

    A line break isn’t appropriate here as you’re not breaking text.

    I’m guessing what you realy want is some space between the items. For this you woudl use a margin.
    Something like:

    item.Content = new Image 
                       { 
                           Source = bi,
                           MaxHeight = 100,
                           MaxWidth = 100,
                           Margin = new Thickness(0, 0, 0, 20)
                       };
    

    This puts 20 pixels space below each image.

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

Sidebar

Related Questions

I'm currently retrieving image data from an iSight camera and I'd like to hand
I'm currently testing out retrieving json from jquery. The service url is: http://imgsvc.heroku.com/images In
I'm currently retrieving and parsing pages from a website using urllib2 . However, there
I have a C# program that retrieves multiple rows from a DB but currently
I am currently retrieving both a UserTransaction and a DataSource from a Weblogic 10.3
Currently I have a the following way of retrieving data from my DB: $school->get('studentCount');
Currently there is a Excel 2002 spreadsheet writing/retrieving data from a Access 2002 database.
I am currently working on a system for storing and retrieving data from a
I'm trying to retrieve multiple rows from joining two tables where store.itemid = item_list.id.
Currently I am retrieving list items from a sharepoint list via the provided web

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.