Latest News

  • Super Tower Defense 2 Game
    Sep 03, 2010

    New to the games section is Super Tower Defense 2. Featuring more maps, new units and bigger explosions.

  • Super Cards Online Multiplayer Game
    Aug 13, 2010

    Released today in the games section is the new Super Cards multiplayer card game. The aim of the game is to get rid of all your playing cards before your opposition.

  • Silverlight Online Chat
    Jul 24, 2010

    Today we launch the new Silverlight Live Chat application demonstrating the Liquid RichTextBox and Emoticon replacements.

  • New Super Shoot Em Up 2 Game
    Jun 29, 2010

    Added to the Games section is the new Super Shoot 'Em Up 2 game. Take control of your tank with the aim to defeat the computer controlled opponents. Features all new weapons, levels and Battle Mode!

  • Silverlight 4 Controls V5.3.2 Released
    Jun 28, 2010

    This release contains several fixes raised in the forums.

samo8076
samo8076
Using a Progress Bar with the population of liquid tree Posted: Jan 19, 2010
 

Hi guys,


Im using the standard Progress Bar in Silverlight 3. Im returning a dataset using LINQ and then populating a liquid treeview by looping through the returned data.


What i want to do is show the progress of this through a progress bar.


The problem is progress bar only updates (or at least shows it) when the process had finished. Im not seeing the progress as i thought i would.


Here is my code


PlotXMLData = XDocument.Parse(e.Result)


            TreeProgBar.Value = 0

            Dim LettingCount = From i In PlotXMLData...<Letting> Select i.@LettingsID

            TreeProgBar.Maximum = LettingCount.Count


            'Dim Letting As Object

            Dim n As Liquid.Node

            For Each SiteNode As Liquid.Node In LettingsTree.Nodes

                Dim intSiteID As Integer

                intSiteID = SiteNode.ID


                Dim Letting = From i In PlotXMLData...<Letting> Select i.@LettingsID, i.@PlotID, i.@SiteID Where SiteID.ToString = intSiteID.ToString


                For c = 0 To Letting.Count - 1

                    n = New Liquid.Node

                    n.Title = Letting(c).PlotID

                    n.ID = Letting(c).LettingsID

                    SiteNode.Nodes.Add(n)


                    TreeProgBar.Value = TreeProgBar.Value + 1

                    TreeProgBar.UpdateLayout()


                Next


            Next


            LettingsTree.UpdateLayout


Any help would be great. Thanks

 
 
dan
dan
RE: Using a Progress Bar with the population of liquid tree Posted: Jan 25, 2010
 

Hi,


I imagine to achieve this you would need to use something like a DispatcherTimer and perform 1 operation for each timer tick and update the progress bar there.


Thanks!

 
 

Rate this page: 

1 Star 2 Star 3 Star 4 Star 5 Star
8 Ratings / 2.5 Average