-
Notifications
You must be signed in to change notification settings - Fork 2
/
UnhandledException.xaml
93 lines (93 loc) · 3.58 KB
/
UnhandledException.xaml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<Window x:Class="TerrariaPixelArtHelper.UnhandledException"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:fa5="http://schemas.fontawesome.com/icons/" xmlns:local="clr-namespace:TerrariaPixelArtHelper"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="Unhandled Exception"
Width="500"
ResizeMode="NoResize" ShowInTaskbar="False"
SizeToContent="Height" Topmost="True"
WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow"
mc:Ignorable="d">
<Window.Background>
<SolidColorBrush Color="{StaticResource {x:Static SystemColors.ControlColorKey}}" />
</Window.Background>
<Window.DataContext>
<local:UnhandledExceptionViewModel />
</Window.DataContext>
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid VerticalAlignment="Top">
<fa5:SvgAwesome Width="50" Height="50"
HorizontalAlignment="Center" VerticalAlignment="Center"
Panel.ZIndex="2"
Icon="Solid_TimesCircle">
<fa5:SvgAwesome.Foreground>
<RadialGradientBrush>
<GradientStop Offset="0.25" Color="Red" />
<GradientStop Offset="1" Color="DarkRed" />
</RadialGradientBrush>
</fa5:SvgAwesome.Foreground>
</fa5:SvgAwesome>
<fa5:SvgAwesome Width="54" Height="54"
HorizontalAlignment="Center" VerticalAlignment="Center"
Panel.ZIndex="1"
Foreground="LightGray" Icon="Solid_TimesCircle" />
<fa5:SvgAwesome Width="56" Height="56"
HorizontalAlignment="Center" VerticalAlignment="Center"
Icon="Solid_TimesCircle" />
</Grid>
<StackPanel Grid.Column="1" Margin="10,0,0,5">
<TextBlock Text="Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately." TextWrapping="Wrap" />
<ContentControl Content="{StaticResource Lines}" />
<TextBlock FontWeight="Bold"
Text="{Binding ExceptionType, Mode=OneWay}"
TextWrapping="Wrap" />
<TextBlock Text="{Binding ExceptionMessage, Mode=OneWay}" TextWrapping="Wrap" />
</StackPanel>
</Grid>
<Button Grid.Row="1"
Width="100"
HorizontalAlignment="Left" HorizontalContentAlignment="Stretch"
Click="Details_Click">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<fa5:SvgAwesome Width="6"
Margin="5,0,0,0" HorizontalAlignment="Left"
Icon="{Binding DetailsIcon}" />
<TextBlock Grid.ColumnSpan="2"
HorizontalAlignment="Center"
Text="Details" />
</Grid>
</Button>
<StackPanel Grid.Row="1" Grid.Column="1"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button Width="100"
Margin="0,0,5,0"
Click="Continue_Click" Content="Continue" />
<Button Width="100"
Click="Quit_Click" Content="Quit" />
</StackPanel>
<TextBox Grid.Row="2"
Height="179"
Margin="0,5,0,0"
HorizontalScrollBarVisibility="Auto" IsReadOnly="True"
Text="{Binding DetailsText, Mode=OneWay}"
VerticalScrollBarVisibility="Auto"
Visibility="{c:Binding ShowDetails,
Mode=OneWay}" />
</Grid>
</Window>