Show progressBar On clicked item in ListView RRS feed

  • Question

  • Hi,

    In my application I have a ListView with data like in a default Grid App template. When User click's an item (ItemInvoked) I want to show a ProgressBar on the item, than start some work, and when that work is completed I want to hide this ProgressBar. 

    What should I do to achieve this? In XAML I would add Boolean property 'IsWorking' and change it to 'True' on 'ItemClickEvent'. 'ProgressBar.Visibility' would be binded to that property. What is the easiest way to do it in WinJS?

    Thanks a lot for your help,


    Tuesday, April 30, 2013 1:44 PM


  • Hi,

    You can do the same in WinJS too. Have a Boolean value in the item data. (The item data should be a binding object). Have the progress bar in you template and bind it's visibility to this Boolean value. You may have to use and converter for the visibility. Change the Boolean value when item is clicked to true and then change it back to false after work is completed 

    Since the item data is binding object it will fire when value is changed, this will fire the converter which will show the progress and when completed the same process will happen to hide the progress.

    Hope this helps.. Let me know if you need further info.

    - Girija

    Tuesday, April 30, 2013 6:55 PM