WPF 实现Loading效果

项目中如下实现遮盖的加载效果,代码不统一,且实现的耦合性比较多,封装了一个加载的控件.

snap

 

使用方法:

1.添加:

 <ResourceDictionary Source="/BusyIndicatorCtrl;Component/BusyIndicator.xaml"/>

2.在所要的容器中插入 BusyIndicator :

  <Grid Grid.Row="0" Width="800" Height="300" Background="Beige">
            <s:BusyIndicator x:Name="busyCtrl"  />
            <Label Content="BusyIndicator 将遮盖它的父容器"></Label>
        </Grid>

设置加载内容的文件并显示:
                this.busyCtrl.IsBusy = true;

                this.busyCtrl.Text = "Loading Content...";


代码下载

posted on 2012-06-19 19:46  Haozes  阅读(7844)  评论(0编辑  收藏  举报