新增一个提示窗体的显示
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:软件系统客户端Wpf"
|
||||
xmlns:y="clr-namespace:ClientsLibrary;assembly=ClientsLibrary"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="550" Width="825" WindowState="Maximized" Activated="Window_Activated" Closing="Window_Closing" ContentRendered="Window_ContentRendered" Initialized="Window_Initialized"
|
||||
Loaded="Window_Loaded"
|
||||
@@ -34,6 +35,8 @@
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
|
||||
<materialDesign:DialogHost x:Name="DialogHostWait">
|
||||
<Grid>
|
||||
<DockPanel>
|
||||
<!--菜单项目-->
|
||||
@@ -173,6 +176,10 @@
|
||||
Click="Button_BackMain_Click">
|
||||
主页
|
||||
</Button>
|
||||
<Button Style="{StaticResource MaterialDesignRaisedLightButton}" Grid.Column="1" Width="60" VerticalAlignment="Center"
|
||||
Click="Button_Dialog_Click">
|
||||
窗口测试
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@@ -279,5 +286,14 @@
|
||||
|
||||
</DockPanel>
|
||||
<materialDesign:Snackbar MessageQueue="{materialDesign:MessageQueue}" x:Name="SoftSnackbar" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<materialDesign:DialogHost.DialogContent>
|
||||
<StackPanel Margin="16">
|
||||
<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="16" IsIndeterminate="True" Value="0" />
|
||||
<TextBlock>正在下载中...</TextBlock>
|
||||
</StackPanel>
|
||||
</materialDesign:DialogHost.DialogContent>
|
||||
</materialDesign:DialogHost>
|
||||
</Window>
|
||||
|
||||
@@ -749,5 +749,12 @@ namespace 软件系统客户端Wpf
|
||||
SetShowRenderControl(UIControl_Home);
|
||||
}
|
||||
|
||||
private async void Button_Dialog_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//点击了显示一个提示的窗体
|
||||
DialogHostWait.IsOpen = true;
|
||||
await Task.Delay(2000);
|
||||
DialogHostWait.IsOpen = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user