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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:54:32+00:00 2026-05-25T13:54:32+00:00

I would like to know what is the best way to show a loading

  • 0

I would like to know what is the best way to show a loading animation while downloading an image.

I have an image which is loaded dynamically from an internet URL. So I have about 1/2 second before seeing my image and i think it depends of the connection. So I would like to show an animation for the user while the image is still downloading.

Tanks for your suggestions

  • 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-25T13:54:32+00:00Added an answer on May 25, 2026 at 1:54 pm

    I finally solved my problem by using the VM (MVVM). I explain if someone have the same kind of trouble :

    First I have Listbox in my view which is connected to a List in my ViewModel. What I did is connect a command to the event SelectionChanged like this :

    <ListBox x:Name="EbookBox" ItemTemplate="{StaticResource ListItemTemplate}" Height="505" ItemsSource="{Binding OBooks, Mode=OneWay}" SelectedItem="{Binding SelectedBook, Mode=TwoWay}">
       <i:Interaction.Triggers>
          <i:EventTrigger EventName="SelectionChanged">
             <cmd:EventToCommand Command="{Binding LoadCoverCommand, Mode=OneWay}" />
          </i:EventTrigger>
       </i:Interaction.Triggers>
    </ListBox>
    

    Then in my function Load cover, I construct the url of the cover and I create a bitmapImage. But before, I initialize a boolean to say it’s loading :

    IsLoadingCover = true;
    // Create the Bitmap and save it to the caching directory
    CurrentCover = new BitmapImage(new Uri(cover));
    CurrentCover.DownloadCompleted += DownloadCompleted;
    

    Finally when the image is download i put the loading indication to false.
    And in my View, my control is only visible when IsLoadingCover is true (Bool to Visibility Converter) :

    <control:LoadingAnimation HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,123,0,0" Visibility="{Binding IsLoadingCover,Converter={StaticResource BoolToVisibilityConverter}}"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i would like to know which is the best way to inform the user
I would like to know what's the best way to organize my php project
I would like to know What is the best way to include 3rd party
I would like to know how to use Queue in the best functional way.
I would like to know what is the best, fastest and easiest way to
I would like to know the best way of parsing an input where multiple
I would like to know what the best way would be to loop through
I would like to know what is the best way to get all the
I would like to know what is the best way to place multiple, small(all
I would like to know what are the best approaches for protecting apllication and

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.