页面效果:点击Load按钮后,5s遮罩+加载条动画
实现思路:通过控制页面元素的层叠关系,用透明元素覆盖的效果达到页面内遮罩效果。
加载条动画采用第三方HandyControl里的加载条。
代码:
Xaml
<Window x:Class="LoadingTest.MainWindow"
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"
xmlns:local="clr-namespace:LoadingTest"
xmlns:hc="https://handyorg.github.io/handycontrol"
mc:Ignorable="d"
Title="MainWindow