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
wfhan
wfhan
multiple dialogs Posted: Sep 16, 2010
 

Hi all,


I've managed to make the liquid.popup runing fine following the 'areYouSure' sample here

http://www.vectorlight.net/controls/popup_dialog.aspx


however, what i would like to know is how can one initite a multiple dialogs of the same type,

each with its own instance.


what i try to do is:

i have a 3x3 rectangles (much like the tic-tac-toe box), each layed out using the silverlight rectangle control.

when i mouse-click on each rectangle, it will pop-up a dialog displaying some info related to the clicked rectangle.

I've managed to pop-up a dialog when i clicked on the desired rectangle, but when i click on another rectangle,

it will close the existing pop-up and pops a new one.


How can i make it such that every time i clicked on different rectangle, it pop-up its own dialog without closing

any existing/opened dialog, the reason is I need pop-ups to be in multiple instance/pop-ups so that i can read

and compare the info inside the pop-ups launched.


pls help.



 
 
dan
dan
RE: multiple dialogs Posted: Sep 27, 2010
 

Hi,


Sure you can achieve this by declaring as many popup dialogs as you need in XAML or in code.  If the content of each dialog should be the same then you create this as a user control and declare a separate instance inside each popup.


The main controls demo demonstrates multiple popup dialogs complete with minimize/maximize functionality which may help.


Thanks!

 
 
luckybet
luckybet
RE: multiple dialogs Posted: Dec 07, 2010
 

I am trying to do the same thing.  Do you have sample code where you would have mutiple instance of the same user control thru code.


Thanks.

 
 
dan
dan
RE: multiple dialogs Posted: Feb 11, 2011
 

Hi,


If you want to show a dialog in more than one place and with different data you simply need to creae more instances of it.  So, for example with the MessageBoxPlus (the same applies to any Dialog control):


MessageBoxPlus dialog1 = new MessageBoxPlus();

LayoutRoot.Children.Add(dialog1);

MessageBoxPlus dialog2 = new MessageBoxPlus();

LayoutRoot.Children.Add(dialog2);

MessageBoxPlus dialog3 = new MessageBoxPlus();

LayoutRoot.Children.Add(dialog3);


Here I have created 3 of the same dialog and added them to my root layout container.  To show them I simply call dialog1.Show() and to open another without closing the 1st dialog I call dialog2.Show().


Thanks!