<Window x:Class="SyncTrayzor.Pages.UnhandledExceptionView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:s="https://github.com/canton7/Stylet"
        xmlns:l="clr-namespace:SyncTrayzor.Localization"
        Height="400" Width="600"
        MinHeight="300" MinWidth="400"
        Title="{l:Loc UnhandledExceptionView_Title}"
        FlowDirection="{x:Static l:Localizer.FlowDirection}">
    <DockPanel Margin="10">
        <StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
            <Image Source="{Binding Icon, Converter={x:Static s:IconToBitmapSourceConverter.Instance}}"
                   Stretch="None" Margin="0,0,10,0"/>
            <TextBlock TextWrapping="Wrap" Text="{l:Loc UnhandledExceptionView_IntroMessage}"/>
        </StackPanel>

        <TextBlock DockPanel.Dock="Top" Margin="0,10,0,0" TextWrapping="Wrap">
            <TextBlock Text="{l:Loc UnhandledExceptionView_PleaseOpenIssue_Pre}"/>
            <Hyperlink Command="{s:Action ShowIssues}">
                <TextBlock Text="{Binding IssuesUrl}"/>
            </Hyperlink>
            <TextBlock Text="{l:Loc UnhandledExceptionView_PleaseOpenIssue_Post}"/>
        </TextBlock>

        <Button DockPanel.Dock="Bottom" HorizontalAlignment="Right" Command="{s:Action Close}" Content="{l:Loc Generic_Dialog_Close}" Style="{StaticResource DialogButton}"
                IsDefault="True" IsCancel="True"/>
        <TextBlock DockPanel.Dock="Bottom" Margin="0,10" TextWrapping="Wrap">
            <TextBlock Text="{l:Loc UnhandledExceptionView_LogFileLocation_Description}"/>
            <Hyperlink Command="{s:Action OpenLogFilePath}"><TextBlock Text="{l:Loc UnhandledExceptionView_LogFileLocation_Link}"/></Hyperlink>
        </TextBlock>

        <TextBox IsReadOnly="True" Text="{Binding ErrorMessage, Mode=OneWay}" FlowDirection="LeftToRight"/>
    </DockPanel>
</Window>
