Slow and steady Silverlight (32)

Source: Internet
Author: User
Tags xmlns silverlight

Introduced

Silverlight 2.0 Tips and Tricks series

Messagebox-messagebox's Demo

Demo of the Popup-popup bomb window

Several implementation methods of circulation-dispatchertimer way, Storyboard Way, Timer way, Compositiontarget.rendering Way

Dynamic Transformation Theme-demonstrates how to dynamically transform a theme

Localization (Multilingual)-demonstrates how to implement support for multiple languages

In response to the mouse double-click event-a double-click event that responds and handles the mouse

Online Demo

Http://www.cnblogs.com/webabcd/archive/2008/10/09/1307486.html

Example

1. Demo MessageBox

Messageboxdemo.xaml

<UserControl x:Class="Silverlight20.Tip.MessageBoxDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel>
<Button x:Name="btnMessageBox" Content="MessageBox 演示" Click="btnMessageBox_Click" Margin="5" />
<TextBlock x:Name="lblResult" />
</StackPanel>
</Grid>
</UserControl>

MessageBoxDemo.xaml.cs

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 Silverlight20.Tip
{
public partial class MessageBoxDemo : UserControl
{
public MessageBoxDemo()
{
InitializeComponent();
}

private void btnMessageBox_Click(object sender, RoutedEventArgs e)
{
MessageBoxResult result = MessageBox.Show("信息", "标题", MessageBoxButton.OKCancel);

lblResult.Text += result.ToString();
}
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.