-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
68 lines (56 loc) · 2.84 KB
/
MainWindow.xaml
File metadata and controls
68 lines (56 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<Window x:Class="AsyncTesting.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:AsyncTesting.Models"
mc:Ignorable="d"
Title="MainWindow" Height="600" Width="950">
<Window.DataContext>
<local:TheViewModel />
</Window.DataContext>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="Thread ID" />
<TextBlock Grid.Column="1" Text="{Binding CurrentThreadID}" FontStyle="Italic" FontWeight="Bold" FontSize="16"/>
<TextBlock Grid.Row="1" Grid.Column="0" Text="Quantity" />
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Quantity}" />
<TextBlock Grid.Row="2" Grid.Column="0" Text="Product Name" />
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding ProductName}" />
<TextBlock Grid.Row="3" Grid.Column="0" Text="Product description" />
<TextBox Grid.Row="3" Grid.Column="1" Name="txtProductDescription" Text="{Binding ProductDescription}" />
<Button Grid.Row="4" Grid.Column="1"
Content="Save Cross Context (will crash)"
Command="{Binding SaveCrossContextCmd}" CommandParameter="{Binding}" />
<Button Grid.Row="5" Grid.Column="1"
Content="Save Context Aware"
Command="{Binding SaveContextAware}" CommandParameter="{Binding}" />
<Button Grid.Row="6" Grid.Column="1"
Content="Save Split Cross Context"
Command="{Binding SaveSplitCrossCtxCmd}" CommandParameter="{Binding}" />
<Button Grid.Row="7" Grid.Column="1"
Content="Deadlock"
Command="{Binding SaveAndDeadLockCmd}" CommandParameter="{Binding}" />
<Button Grid.Row="8" Grid.Column="1"
Content="No Deadlock"
Command="{Binding SaveWithNoDeadlockCmd}" CommandParameter="{Binding}" />
<Button Grid.Row="9" Grid.Column="1"
Content="ConfigureAwait False doesn't always save you!"
Command="{Binding SaveCompletedTaskCmd}" CommandParameter="{Binding}" />
</Grid>
</Window>