silverlight 中的busyIndicator 加载控件
来源:互联网 发布:手机淘宝怎么改成好评 编辑:程序博客网 时间:2024/05/21 22:52
XAML代码
<UserControl x:Class="SilverlightApplication9.MainPage"
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"
mc:Ignorable="d"
d:DesignHeight="598" d:DesignWidth="825" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit">
<Grid x:Name="LayoutRoot" Background="White" Height="528" Width="743">
<Canvas Height="506" HorizontalAlignment="Left" Margin="10,10,0,0" Name="canvas1" VerticalAlignment="Top" Width="733">
<TextBox Canvas.Left="185" Canvas.Top="36" Height="157" Name="textBox1" Width="301" />
<Button Canvas.Left="293" Canvas.Top="264" Content="填入数据" Height="23" Name="button1" Width="75" Click="button1_Click" />
</Canvas>
<Canvas Canvas.Left="10" Canvas.Top="10" Name="canvas2" Margin="13,19,0,0" Background="White" Visibility="Collapsed">
<toolkit:BusyIndicator Canvas.Left="207" Canvas.Top="211" Height="95" Name="busyIndicator1" Width="304" BusyContent="正在加载数据,请稍后!" IsBusy="False" />
</Canvas>
</Grid>
</UserControl>
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;
using System.Threading;
namespace SilverlightApplication9
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
private void button1_Click(object sender, RoutedEventArgs e)
{
busyIndicator1.IsBusy = true;
textBox1.Text = "123333333333333333333333333333333334566666666666666";
canvas2.Visibility = Visibility.Visible;
ThreadPool.QueueUserWorkItem((threadState) =>
{
Thread.Sleep(5000);
Dispatcher.BeginInvoke(() =>
canvas2.Visibility = Visibility.Collapsed);
Dispatcher.BeginInvoke(() =>
busyIndicator1.IsBusy = false);
});
}
}
}
实例下载http://download.csdn.net/detail/bychentufeiyang/3914725
- silverlight 中的busyIndicator 加载控件
- Silverlight中的进度条 BusyIndicator
- Silverlight 自定义 BusyIndicator
- QML中的BusyIndicator
- SilverLight动态加载控件
- 在Silverlight中加载外部XAP中的控件
- silverlight中的控件们
- silverlight TreeView控件 动态加载
- Datagrid加载和提交时候自动出现BusyIndicator并绑定
- 精通Silverlight——12.4 使用Silverlight SDK中的控件
- Silverlight中的图表控件visifire的使用
- silverlight 中的跨线程访问控件问题
- 如何抽象silverlight中的控件类
- Flex BusyIndicator
- Silverlight窗体加载时让控件获得焦点
- Silverlight 中得到控件模板中的子控件
- silverlight控件
- Silverlight 控件
- WebCore 中的 http 请求信息维护
- 在Trac上增加工作流状态(trac-workflow)
- Android之服务Service---电话监听
- 敏捷开发团队管理系列之二:程序与测试团队I
- Android--Service生命周期(二)
- silverlight 中的busyIndicator 加载控件
- iphone中使用NSoperation实现图片异步加载
- fastcall cdecl stdcall thiscall
- 六十六条经典禅语
- the art of disassembly chapter01-----lesson1--03
- 用Eclipse开发android原码
- spring AOP零配置
- MyEclipse 快捷键
- “21天教你学会C++”