Reputation: 9963
I am playing around and trying to learn silverlight4. I have an existing asp.net page with and area of 600 * 400px available for my silverlight form.
My silverlight application has 2 usercontrols. The 1st usercontrol contains a listview of some data, when a user clicks on a list item I display the 2nd usercontrol.
Is it possible from the 2nd usercontrol to call a clientside function within the page so I can have a similar effect as a modal popup?
Any help would be great!!!!
Upvotes: 2
Views: 1404
Reputation: 7531
You can create the modal effect by overlaying the page with a div. Here is a tutorial for creating the modal DIV in the HTML/Javascript:
http://raventools.com/blog/2911/create-a-modal-dialog-using-css-and-javascript
Once you it set up, whenever you wish to trigger it, simply use the DOM interaction from Silverlight to fire the overlay:
Html.Window.Invoke("overlay");
Upvotes: 1
Reputation: 189495
You should derive your second control from ChildWindow
(and make a search on the web for examples of using ChildWindow
). This control is designed to deliver this modal pattern you are after.
Upvotes: 1