今天发现dev控件自带了等待框,调用方便,而且不会阻塞主线程。

C# 等待框

 

拉一个窗体,界面上放两个按钮,显示等待框,隐藏。

<Window x:Class="WaitDialogTest.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:WaitDialogTest"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Button Content="显示等待框" HorizontalAlignment="Left" Margin="258,122,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
        <Button Content="隐藏" HorizontalAlignment="Left" Margin="464,122,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_1"/>

    </Grid>
</Window>
View Code

相关文章:

  • 2021-12-05
  • 2022-12-23
  • 2021-06-16
  • 2021-06-03
  • 2021-07-11
  • 2021-08-21
  • 2021-04-19
  • 2022-01-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案