Vectorlight News

  • Chat App Converted to HTML and JQuery
    Sep 08, 2011

    Converted from Silverlight to HTML and Javascript/JQuery is the Vectorlight Chat App. Login using your Vectorlight password to chat using your username and avatar.

  • HTML5 iPhone,Android Big Guns Tower Defense
    Jul 02, 2011

    Big Guns has made the leap from Windows Phone 7 (XNA) to HTML5 so you can now play it on your iPhone, Android and other HTML5 compatible devices.

  • HTML5 Games - Word Poppers and Batty
    Jun 04, 2011

    As the take-up of HTML5 quickens (74% of users currently have a browser capable of HTML5 Canvas) we present two more games for both your browser and mobile.

  • Big Guns Tower Defense on Windows Phone 7
    May 06, 2011

    Coming soon to Windows Phone 7 is an XNA port of the popular Vectorlight tower defense game Super Tower Defense. Whilst retaining many of the graphical and gameplay features of the original Silverlight game.

  • Wakacube WP7 Update
    Apr 26, 2011

    Released to the Windows Phone 7 marketplace today is Version 1.1 of Wakacube the 3D physics game of skill. Included in the update are more levels (30 in total) and new mode Wakatime which generates random crate structures to keep players entertained long after the levels have been completed.

  • Home Page News
charly
charly
Populate??? Expand??? expanded??? Posted: Mar 01, 2010
 

I have the following code:

if (cctx.IsLoading) return;

            EntitySet<Materias> entidad = (EntitySet<Materias>)sender;

            List<Materias> mats = entidad.ToList();

            CETreeView.Clear();

            //ObservableCollection<Node> nodos = new ObservableCollection<Node>();

            foreach (Materias item in mats)

            {

                Node nodoActual = new Node("" + item.IdMateria, item.Descripcion, true);

                nodoActual.Tag = item;

                nodoActual.ChildrenLoaded=false;

                nodoActual.PopulateChildren += new TreeEventHandler(Materias_NodeExpanded);

                CETreeView.Nodes.Add(nodoActual);

            }

            

            Cursor = Cursors.Arrow;

I want that the node reaches the Materias_NodeExpanded when i expand the node in order to get their childs (not to charge all of them from the beggining), i already tried with PopulateChildren, Expanded, Expand events but the code of Materias_NodeExpanded is not being executed. What's the right way to do it?

 
 
charly
charly
RE: Populate??? Expand??? expanded??? Posted: Mar 02, 2010
 

The problems is that when i add a new Node to the existing node all the NodeExpand Event becames null, the workaround can be (and that's the way i am doing it now to set the NodeExpand at the end of the process, so no new nodes will be in the Nodes collection and the eventhandler will not be updated to null...