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
edhalsim
edhalsim
Dialog popup and validation Posted: Oct 19, 2009
 

Hi,

I really like the way the popup dialog works (ShowAsModal), but I have a couple of questions:

1.  How does the Custom button work?  Having it in the list of buttons doesn't seem to do anything and I don't see a CustomContent property.

2.  I need to do some form validation in my dialog user control when the user presses "OK" and if there are errors show them and leave the dialog open.  Is that possible?

3.  Can you control the order of the buttons displayed?


Thanks!

 - Ed.

 
 
dan
dan
RE: Dialog popup and validation Posted: Oct 22, 2009
 

Hi Ed,


Specifying custom buttons is a bit limited at the moment and must be done in code, something like this:


myDialog.CreateButton(DialogButtons.Custom, "My Button", "myButton", true);


The 4th parameter determines whether the button is inserted before or after the existing buttons.


Regarding validation, you can stop the dialog from closing in the Closed event by setting e.Cancel = true:


private void myDialog_Closed(object sender, DialogEventArgs e)

{

    switch (e.Tag.ToString())

    {

        case "myButton":

            // Custom button clicked, do some validation

            if (Validate())

            {

                e.Cancel = true;

            }

            break;

    }

}


Thanks!

 
 
beaudetious
beaudetious
RE: Dialog popup and validation Posted: Mar 22, 2010
 

Exactly what I was looking for.  Thanks!

 
 
beaudetious
beaudetious
RE: Dialog popup and validation Posted: Mar 22, 2010
 

"Regarding validation, you can stop the dialog from closing in the Closed event by setting e.Cancel = true:"


That's what I meant to say was exactly what I was looking for.  This forum needs the ability to edit a post.  Can't you create an awesome Silverlight control for that?


Thanks,


Beaudetious

 
 
dan
dan
RE: Dialog popup and validation Posted: Mar 28, 2010
 

Hi Beaudetious,


Thanks for the info.  With regards to editing forum posts at the moment that is not possible, however we hope to get editing functionality implemented.


Thanks!

 
 

Rate this: 

1 Star 2 Star 3 Star 4 Star 5 Star
12 Ratings / 3.3 Average