<UserControl x:Class="ZuneUIXTools.Modules.UIXCompiled.UIXLogView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:ZuneUIXTools.Modules.UIXCompiled"
             xmlns:uixDebugData="clr-namespace:Microsoft.Iris.Debug.Data"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800"
             d:DataContext="{d:DesignInstance local:UIBDisassemblyViewModel}">
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <CheckBox Content="Auto-scroll" IsChecked="{Binding AutoScroll}" Padding="4"/>

        <DataGrid x:Name="InstructionListView" IsReadOnly="True" AutoGenerateColumns="False"
                  ItemsSource="{Binding Instructions}" SelectionChanged="InstructionListView_SelectionChanged"
                  Grid.Row="1">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Source" Binding="{Binding LoadUri}"/>
                <DataGridTextColumn Header="Instruction" Binding="{Binding InstructionString}"/>
            </DataGrid.Columns>
            <DataGrid.RowDetailsTemplate>
                <DataTemplate DataType="uixDebugData:InterpreterEntry">
                    <Border Padding="8">
                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Parameters:"/>
                            <ItemsControl ItemsSource="{Binding Parameters}"/>
                            <Border Height="1" Background="Gray" Margin="0,8"/>
                            <TextBlock Text="Return values:"/>
                            <ItemsControl ItemsSource="{Binding ReturnValues}"/>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </DataGrid.RowDetailsTemplate>
        </DataGrid>
    </Grid>
</UserControl>
