1+ <mah : MetroWindow x : Class =" SOTFEdit.View.UnhandledExceptionWindow"
2+ xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+ xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
4+ xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
5+ xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
6+ xmlns : mah =" http://metro.mahapps.com/winfx/xaml/controls"
7+ xmlns : viewModel =" clr-namespace:SOTFEdit.ViewModel"
8+ d : DataContext =" {d:DesignInstance viewModel:UnhandledExceptionViewModel}"
9+ mc : Ignorable =" d"
10+ Padding =" 15"
11+ WindowStartupLocation =" CenterOwner"
12+ WindowTransitionsEnabled =" False"
13+ TitleCharacterCasing =" Normal"
14+ Title =" Unhandled Exception" Height =" 800" Width =" 800" >
15+ <Window .Resources>
16+ <Style x : Key =" Label"
17+ TargetType =" TextBlock" >
18+ <Setter Property =" FontWeight" Value =" Bold" />
19+ <Setter Property =" Margin" Value =" 0,8,0,4" />
20+ </Style >
21+ <Style x : Key =" Content"
22+ TargetType =" TextBlock" >
23+ <Setter Property =" Margin" Value =" 0,4,0,8" />
24+ </Style >
25+ </Window .Resources>
26+ <Grid >
27+ <Grid .RowDefinitions>
28+ <!-- Info -->
29+ <RowDefinition Height =" auto" />
30+ <!-- Exception details -->
31+ <RowDefinition Height =" *" />
32+ <!-- Button -->
33+ <RowDefinition Height =" auto" />
34+ </Grid .RowDefinitions>
35+
36+ <!-- Info -->
37+ <TextBlock Margin =" 16"
38+ FontSize =" 14"
39+ Text =" An unexpected error occured. The application state might be corrupted."
40+ TextWrapping =" Wrap" />
41+
42+ <!-- Exception details -->
43+ <GroupBox Grid.Row=" 1" Header =" Exception Details" Margin =" 16,8,16,8" >
44+ <ScrollViewer HorizontalScrollBarVisibility =" Auto"
45+ VerticalScrollBarVisibility =" Auto" >
46+ <StackPanel >
47+ <!-- Exception Message -->
48+ <TextBlock Style =" {StaticResource Label}"
49+ Text =" Exception message" />
50+ <TextBlock
51+ Text =" {Binding Exception.Message, Mode=OneWay, TargetNullValue=-}"
52+ TextWrapping =" Wrap" />
53+ <!-- Exception Type -->
54+ <TextBlock Style =" {StaticResource Label}"
55+ Text =" Exception type" />
56+ <TextBlock Style =" {StaticResource Content}"
57+ Text =" {Binding ExceptionType, Mode=OneWay, TargetNullValue=-}" />
58+ <!-- Callstack -->
59+ <TextBlock Style =" {StaticResource Label}"
60+ Text =" Callstack" />
61+ <TextBlock Style =" {StaticResource Content}"
62+ Text =" {Binding Exception.StackTrace, Mode=OneWay, TargetNullValue=-}" />
63+ <!-- Inner exception -->
64+ <TextBlock Style =" {StaticResource Label}"
65+ Text =" Inner exception" />
66+ <TextBlock Style =" {StaticResource Content}"
67+ Text =" {Binding Exception.InnerException, Mode=OneWay, TargetNullValue=-}" />
68+ </StackPanel >
69+ </ScrollViewer >
70+ </GroupBox >
71+ <StackPanel Orientation =" Horizontal" Grid.Row=" 2" HorizontalAlignment =" Right" Margin =" 15" >
72+ <Button Background =" DarkGreen" Padding =" 10" Margin =" 0 0 10 0" Command =" {Binding CopyToClipboardCommand}" >Copy Error to Clipboard</Button >
73+ <Button Background =" DarkRed" Padding =" 10" Command =" {Binding ExitApplicationCommand}" >Exit Application</Button >
74+ </StackPanel >
75+ </Grid >
76+ </mah : MetroWindow >
0 commit comments