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

WPF 实现Loading效果

 

使用方法:

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...";


代码下载

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-12-28
  • 2022-12-23
  • 2022-01-01
  • 2021-08-13
猜你喜欢
  • 2021-10-15
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案