Latest News

  • Super Tower Defense Game
    Mar 10, 2010

    New to the games section is the new Super Tower Defense game. Defend your base from the ever advancing army of tanks, buggies...

  • New Rich Text Editor User Control
    Feb 19, 2010

    By popular request, here we present a re-usable User Control containing the Liquid RichTextBox along with the most common formatting functions included.

  • Silverlight 3 Controls V5.2.7 Released
    Feb 19, 2010

    This release includes several fixes for issues raised in the forum. The main improvement is to the RichTextBox which now provides access and methods to the document elements allowing...

  • Super Shoot Em Up Game
    Feb 04, 2010

    Added to the games section is the new Super Shoot 'Em Up game. Take control of a tank with your aim being to blow up your opposing tanks and collect all the powerups.

  • Silverlight 3 Controls V5.2.6 Released
    Feb 04, 2010

    This release includes some minor fixes for several forum posts. Please see the notes on the download page for full details on what has changed.

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!