123456789101112131415161718192021 |
- <Window x:Class="Test.TaskTest.WinTask"
- 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:Test.TaskTest"
- mc:Ignorable="d"
- Title="WinTask" Height="450" Width="800">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Button Content="普通Task,弹出窗体。。发生异常" Click="Button_Click"></Button>
- <Button Grid.Row="1" Content="封装Task弹出非模态窗。。。闪退" Click="Button_Click_1"></Button>
- <Button Grid.Row="2" Content="封装Task弹出模态窗体。。。阻塞线程" Click="Button_Click_2"></Button>
- <Button Grid.Row="3" Content="封装Task弹出非模态窗,开启线程UI调度事件,正常" Click="Button_Click_3"></Button>
- </Grid>
- </Window>
|