.NET, Archive, C#
     

Silverlight MessageBox

Silverlight oddly enough lacks a MessageBox class. Fortunately Silverlight’s HTML Bridge exposes the JavaScript Alert method, which is functionally the same thing.

The above dialog is actually initiated by Silverlight using the following code:

using System.Windows.Browser;
//...
HtmlPage.Window.Alert("Hello from Silverlight");

Never miss an article! Subscribe to my newsletter and I'll keep you updated with the latest content.

 

About Jason

Jason is an experienced entrepreneur & software developer skilled in leadership, mobile development, data synchronization, and SaaS architecture. He earned his Bachelor of Science (B.S.) in Computer Science from Arkansas State University.
View all posts by Jason →

Leave a Reply

Your email address will not be published. Required fields are marked *