<windowManager:ManagedWindow xmlns="https://github.com/avaloniaui"
                             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                             xmlns:console="https://github.com/jinek/consolonia"
                             xmlns:windows="clr-namespace:Aaru.Tui.ViewModels.Windows"
                             xmlns:windowManager="clr-namespace:Iciclecreek.Avalonia.WindowManager;assembly=Iciclecreek.Avalonia.WindowManager"
                             xmlns:localization="clr-namespace:Aaru.Tui.Localization"
                             x:Class="Aaru.Tui.Views.Windows.HexViewWindow"
                             WindowState="FullScreen"
                             CanResize="False">
    <Design.DataContext>
        <windows:HexViewWindowViewModel />
    </Design.DataContext>
    <DockPanel>
        <Menu DockPanel.Dock="Bottom">
            <MenuItem Header="{x:Static localization:Resources.Back_Header}"
                      HotKey="Escape"
                      Command="{Binding BackCommand, Mode=OneWay}" />
            <MenuItem Header="{x:Static localization:Resources.Help_Header}"
                      Command="{Binding HelpCommand, Mode=OneWay}"
                      HotKey="F1" />
            <MenuItem Header="{x:Static localization:Resources.Next_Header}"
                      Command="{Binding NextSectorCommand, Mode=OneWay}"
                      HotKey="F2" />
            <MenuItem Header="{x:Static localization:Resources.Prev_Header}"
                      Command="{Binding PreviousSectorCommand, Mode=OneWay}"
                      HotKey="F3" />
            <MenuItem Header="{x:Static localization:Resources.GoTo_Header}"
                      Command="{Binding GoToCommand, Mode=OneWay}"
                      HotKey="F4" />
            <MenuItem Header="{x:Static localization:Resources.Long_Header}"
                      Command="{Binding ToggleLongCommand, Mode=OneWay}"
                      HotKey="F5" />
            <MenuItem Header="{x:Static localization:Resources.Exit_Header}"
                      HotKey="F10"
                      Command="{Binding ExitCommand, Mode=OneWay}" />
        </Menu>
        <Border BorderThickness="1">
            <Border.BorderBrush>
                <console:LineBrush LineStyle="DoubleLine"
                                   Brush="Blue" />
            </Border.BorderBrush>
            <Grid RowDefinitions="Auto,Auto,*,Auto">
                <TextBlock Grid.Row="0"
                           Foreground="Green"
                           Text="{Binding FilePath, Mode=OneWay}" />
                <!-- Header -->
                <Grid Grid.Row="1"
                      ColumnDefinitions="Auto,*,Auto">
                    <TextBlock Grid.Column="0"
                               Text="{x:Static localization:Resources.Offset_Text}"
                               HorizontalAlignment="Left"
                               Foreground="Cyan"
                               FontWeight="Bold" />
                    <TextBlock Grid.Column="1"
                               HorizontalAlignment="Center"
                               Text="00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F"
                               Foreground="Cyan"
                               FontWeight="Bold" />
                    <TextBlock Grid.Column="2"
                               Text="{x:Static localization:Resources.ASCII_Text}"
                               HorizontalAlignment="Left"
                               Foreground="Cyan"
                               FontWeight="Bold" />
                </Grid>

                <!-- Hex View Content -->
                <ScrollViewer Grid.Row="2"
                              Background="Transparent"
                              x:Name="HexScrollViewer">
                    <ItemsControl ItemsSource="{Binding Lines, Mode=OneWay}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate DataType="windows:HexViewLine">
                                <Grid ColumnDefinitions="Auto,*,Auto">
                                    <!-- Offset Column -->
                                    <TextBlock Grid.Column="0"
                                               Text="{Binding OffsetString, Mode=OneWay}"
                                               Foreground="Yellow" />

                                    <!-- Hex Column -->
                                    <TextBlock Grid.Column="1"
                                               HorizontalAlignment="Center"
                                               Text="{Binding HexString, Mode=OneWay}"
                                               Foreground="White" />

                                    <!-- ASCII Column -->
                                    <TextBlock Grid.Column="2"
                                               Text="{Binding AsciiString, Mode=OneWay}"
                                               Foreground="LightGreen" />
                                </Grid>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </ScrollViewer>
                <StackPanel Orientation="Horizontal"
                            Grid.Row="3">
                    <TextBlock Foreground="SlateBlue"
                               Text="{x:Static localization:Resources.CurrentSector_Text}" />
                    <TextBlock Foreground="Lime"
                               Text="{Binding CurrentSector, Mode=OneWay}" />
                </StackPanel>
            </Grid>
        </Border>
    </DockPanel>
</windowManager:ManagedWindow>