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
smithlan
smithlan
Proper way to cancel edit of tree node title? Posted: Apr 08, 2010
 

I've set up a tree view so that when the user double clicks on a node, they can edit its title (IsEditable is set to true).   This works fine but the event handler for NodeEdited ALWAYS gets called, even if the user hits ESC to cancel the edit.  Is there a way to keep this from happening so that NodeEdited is only triggered when the user hits Enter?


Thank you.

 
 
dan
dan
RE: Proper way to cancel edit of tree node title? Posted: Apr 10, 2010
 

Hi,


Thats true, however when the event is called you have access to the current Title and the EditedTitle.  Simply comare these two and perform your actions when they differ.


if(e.Source.EditedTitle != e.Source.Title)

{

        // Perform operation when edited

}


Thanks!

 
 
smithlan
smithlan
RE: Proper way to cancel edit of tree node title? Posted: Apr 12, 2010
 

Hi, Dan.  

That works if the user edits the title and then clicks somewhere off that node to put focus elsewhere.  I'm able to detect that the EditedTitle and Title are equivalent and the operation is canceled.  However, it does not work if the user presses ESC.  In that case, Title and Edited titles are different, just as they are when the user presses enter.  I'm simply looking for behavior similar to how Windows works.  (Actually, when renaming a Windows folder, for example, you press ESC to cancel and press Enter or simply place focus elsewhere to confirm).


Thank you.

 
 
dan
dan
RE: Proper way to cancel edit of tree node title? Posted: Apr 13, 2010
 

Hi,


Good point, i've altered the code to reset the EditedTitle property to the original node title.  The NodeEdited event will still be raised but with the two properties now being the same it should be easy for you to dismiss events where no change has occurred.


This update will be included in the next version which will be released in conjunction with the official Silverlight 4 release.



Thanks!