Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Custom MessageBox Control for Silverlight 3

, 19 Sep 2009 CPOL
Creating a user control for displaying a custom messagebox in Silverlight 3.0
messageboxcontrol_src.zip
MessageBoxControl_Src
MessageBoxControl
MessageBoxControl.sln.cache
MessageBoxControl.suo
MessageBoxControl
aero bg.png
error.png
info.png
MessageBoxControl.csproj.user
Properties
question.png
warning.png
messageboxtest__demo.zip
MessageBoxTest _demo
MessageBoxTest Sample Project
MessageBoxTest.sln.cache
MessageBoxTest.suo
MessageBoxTest
favicon.ico
Properties
<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	x:Class="MessageBoxTest.MainPage"
	Width="491" Height="406" mc:Ignorable="d">

	<Grid x:Name="LayoutRoot" Background="White">
		<TextBlock HorizontalAlignment="Left" Margin="8,42,0,0" VerticalAlignment="Top" Text="Type in your message" TextWrapping="Wrap"/>
		<TextBox x:Name="txtMsg" Height="64" Margin="148,42,133,0" VerticalAlignment="Top" TextWrapping="Wrap" TabIndex="2"/>
		<Button x:Name="btnDisplay" HorizontalAlignment="Right" Margin="0,132,16,0" VerticalAlignment="Top" Width="113" Content="Show Message" Click="btnDisplay_Click" TabIndex="5"/>
		<TextBlock HorizontalAlignment="Left" Margin="8,134,0,0" VerticalAlignment="Top" Text="Type in your message" TextWrapping="Wrap"/>
		<TextBlock HorizontalAlignment="Left" Margin="8,14,0,0" VerticalAlignment="Top" Text="Message title" TextWrapping="Wrap"/>
		<TextBox x:Name="txtTitle" Margin="148,14,133,0" VerticalAlignment="Top" TextWrapping="Wrap" TabIndex="1"/>
		<TextBlock HorizontalAlignment="Left" Margin="8,110,0,0" VerticalAlignment="Top" Text="Messagebox buttons" TextWrapping="Wrap"/>
		<ComboBox x:Name="comboButtons" Margin="148,110,133,0" VerticalAlignment="Top" TabIndex="3">
			<ComboBoxItem Content="Yes &amp; No"/>
			<ComboBoxItem Content="Yes, No &amp; Cancel"/>
			<ComboBoxItem Content="Ok"/>
			<ComboBoxItem Content="Ok &amp; Cancel"/>
		</ComboBox>
		<ComboBox x:Name="comboTypes" Margin="148,134,133,0" VerticalAlignment="Top" TabIndex="4">
			<ComboBoxItem Content="Information Message"/>
			<ComboBoxItem Content="Error Message"/>
			<ComboBoxItem Content="Confirmation Message"/>
			<ComboBoxItem Content="Warning Message"/>
		</ComboBox>
	</Grid>
</UserControl>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ahmed_Said
Software Developer Asset Technology Group
Egypt Egypt
I'm a professional components designer, web developer, UX engineer and 3d designer as well, I'm 4 years experienced .net software engineer and 7 years experienced 3d designer using 3D Max. I'm very interested in RIA technologies, prototyping and UX engineering.
 
Ahmed Said
Senior .Net Software Engineer
Follow on   Twitter

| Advertise | Privacy | Mobile
Web04 | 2.8.141022.2 | Last Updated 19 Sep 2009
Article Copyright 2009 by Ahmed_Said
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid