Silverlight Popup MessageBox
This Silverlight only Popup MessageBox is easy to implement on your Silverlight driven website and is also customizable to provide a visual feel suitable for any site design.
To use the Popup MessageBox control you will need to add a reference to Liquid.Popup.dll in your project.
You need to login to Download the Popup MessageBox example, If you do not have a login you can register for free!
How to Use the Popup MessageBox Control
To use the Popup MessageBox on your Silverlight page:
<UserControl x:Class="MessageBox.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:liquidPopup="clr-namespace:Liquid;assembly=Liquid.Popup"
Width="400" Height="300">
<Canvas x:Name="LayoutRoot" Background="White">
<Button x:Name="messageboxButton" Canvas.Left="16" Canvas.Top="8" Width="250" Height="32" Content="MessageBox Dialog" Cursor="Hand" Click="MessageBox_ButtonClick" />
<liquidPopup:MessageBox x:Name="messageBoxDialog" Canvas.Left="50" Canvas.Top="50" />
</Canvas>
</UserControl>
In your C# code behind file you can refer to the MessageBox using messageBoxDialog. In this example we create a simple popup dialog containing a Close button with some text.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace MessageBox
{
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();
}
private void MessageBox_ButtonClick(object sender, RoutedEventArgs e)
{
messageBoxDialog.ShowAsModal("This is a Liquid Controls message box, a simplified version of our Dialog control", "Error");
}
}
}
Example Silverlight Popup MessageBox Control:
Your Comments and Questions Answered
You are not logged in. You need to login to post new messages, if you do not have a login you can register for free!