<Window x:Class="HandBrakeWPF.Views.LogView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:cal="http://www.caliburnproject.org"
        xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
        Title="{Binding Title}"
        Width="525"
        Height="600"
        MinWidth="525"
        MinHeight="600"
        WindowStartupLocation="CenterScreen"
        TextOptions.TextFormattingMode="Display">
    <Grid>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
                       
            <ToolBar Grid.Row="0"
                     ToolBar.OverflowMode="Never" 
                     ToolBarTray.IsLocked="True"
                     Loaded="ToolBarLoaded"
                     >

                <Button cal:Message.Attach="[Event Click] = [Action CopyLog]" Margin="10,0,0,0">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="Images/copy.png" />
                        <TextBlock Margin="2,0,0,0" Text="{x:Static Properties:ResourcesUI.LogView_CopyClipboard}" />
                    </StackPanel>
                </Button>
                <Button Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action OpenLogDirectory]">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Source="Images/folder.png" />
                        <TextBlock Margin="2,0,0,0" Text="{x:Static Properties:ResourcesUI.LogView_OpenLogDir}" />
                    </StackPanel>
                </Button>

            </ToolBar>

            <TextBox Grid.Row="2" ScrollViewer.VerticalScrollBarVisibility="Visible" TextWrapping="Wrap" x:Name="logText">

                <TextBox.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="{x:Static Properties:ResourcesUI.LogView_CopyClipboard}" cal:Message.Attach="[Event Click] = [Action CopyLog]" >
                            <MenuItem.Icon>
                                <Image Width="16" Source="Images/copy.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                        <MenuItem Header="{x:Static Properties:ResourcesUI.LogView_OpenLogDir}" cal:Message.Attach="[Event Click] = [Action OpenLogDirectory]">
                            <MenuItem.Icon>
                                <Image Width="16" Source="Images/folder.png" />
                            </MenuItem.Icon>
                        </MenuItem>
                        <Separator />
                        <MenuItem Header="Auto Scroll" IsCheckable="True" IsChecked="True" x:Name="AutoScroll" />
                        
                    </ContextMenu>
                </TextBox.ContextMenu>
            </TextBox>

        </Grid>

    </Grid>
</Window>
