<commit_before>﻿<UserControl x:Class="AvaloniaVS.Views.AvaloniaDesigner"
             x:ClassModifier="internal"
             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:AvaloniaVS.Views"
             xmlns:conv="clr-namespace:AvaloniaVS.Converters"
             xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
             xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
             xmlns:theming="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Imaging"
             xmlns:util="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Utilities"
             mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"
             Name="root"
             Background="{DynamicResource VsBrush.ToolWindowBackground}"
             theming:ImageThemingUtilities.ImageBackgroundColor="{Binding Background, RelativeSource={RelativeSource Self}, Converter={StaticResource BrushToColorConverter}}">

    <UserControl.Resources>
        <util:BrushToColorConverter x:Key="BrushToColorConverter"/>
        <conv:EnumToIntConverter x:Key="EnumToInt"/>
        <conv:NotNullOrEmptyToVisibilityConverter x:Key="NotNullOrEmpty"/>
    </UserControl.Resources>

    <DockPanel>
        <TextBlock Name="pausedMessage"
                   DockPanel.Dock="Top"
                   Background="{DynamicResource VsBrush.InfoBackground}"
                   Padding="4"
                   VerticalAlignment="Top">
            The designer is paused waiting for a build to complete.
        </TextBlock>
        <DockPanel Name="toolbar"
                   DockPanel.Dock="Top"
                   Grid.Row="0"
                   Margin="4"
                   VerticalAlignment="Top">

            <DockPanel.Resources>
                <Style TargetType="ListBox">
                    <Setter Property="Background" Value="Transparent"/>
                    <Setter Property="BorderThickness" Value="0"/>
                    <Setter Property="ItemsPanel">
                        <Setter.Value>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal"/>
                            </ItemsPanelTemplate>
                        </Setter.Value>
                    </Setter>
                    <Setter Property="Margin" Value="0 0 10 0"/>
                    <Setter Property="DockPanel.Dock" Value="Right"/>
                </Style>
            </DockPanel.Resources>

            <ComboBox DockPanel.Dock="Right"
                      ItemsSource="{Binding Targets, ElementName=root}"
                      SelectedItem="{Binding SelectedTarget, ElementName=root}"
                      DisplayMemberPath="Name"
                      Padding="2"
                      Visibility="{Binding Targets, ElementName=root, Converter={StaticResource NotNullOrEmpty}}"
                      local:VsTheme.UseVsTheme="True" >
            </ComboBox>

            <ListBox SelectedIndex="{Binding View, ElementName=root, Mode=TwoWay, Converter={StaticResource EnumToInt}}">
                <ListBoxItem ToolTip="Split View">
                    <imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.Splitter}"/>
                </ListBoxItem>
                <ListBoxItem ToolTip="Design View">
                    <imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.HTMLDesignView}"/>
                </ListBoxItem>
                <ListBoxItem ToolTip="XAML View">
                    <imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.MarkupTag}"/>
                </ListBoxItem>
            </ListBox>

            <ListBox SelectedIndex="{Binding SplitOrientation, ElementName=root, Mode=TwoWay, Converter={StaticResource EnumToInt}}">
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
                <ListBoxItem ToolTip="Horizontal Layout">
                    <imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.SplitScreenHorizontally}"/>
                </ListBoxItem>
                <ListBoxItem ToolTip="Vertical Layout">
                    <imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.SplitScreenVertically}"/>
                </ListBoxItem>
            </ListBox>
            <Control/>
        </DockPanel>

        <Grid x:Name="mainGrid">
            <Grid.RowDefinitions>
                <RowDefinition x:Name="previewRow"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition x:Name="codeRow"/>
            </Grid.RowDefinitions>

            <local:AvaloniaPreviewer x:Name="previewer"/>
            <StackPanel Name="error"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Visibility="Collapsed">
                <TextBlock Name="errorHeading" FontSize="18" HorizontalAlignment="Center"/>
                <TextBlock Name="errorMessage" Margin="0,20,0,0"/>
            </StackPanel>

            <GridSplitter x:Name="splitter"
                          Grid.Row="1"
                          Grid.Column="1"
                          Height="5"
                          HorizontalAlignment="Stretch"/>

            <Decorator Grid.Row="2" Grid.Column="2" Name="editorHost"/>
        </Grid>
    </DockPanel>
    
</UserControl>
<commit_msg>Swap sides for vertical layout.<commit_after>﻿<UserControl x:Class="AvaloniaVS.Views.AvaloniaDesigner"
             x:ClassModifier="internal"
             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:AvaloniaVS.Views"
             xmlns:conv="clr-namespace:AvaloniaVS.Converters"
             xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
             xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
             xmlns:theming="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Imaging"
             xmlns:util="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Utilities"
             mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"
             Name="root"
             Background="{DynamicResource VsBrush.ToolWindowBackground}"
             theming:ImageThemingUtilities.ImageBackgroundColor="{Binding Background, RelativeSource={RelativeSource Self}, Converter={StaticResource BrushToColorConverter}}">

    <UserControl.Resources>
        <util:BrushToColorConverter x:Key="BrushToColorConverter"/>
        <conv:EnumToIntConverter x:Key="EnumToInt"/>
        <conv:NotNullOrEmptyToVisibilityConverter x:Key="NotNullOrEmpty"/>
    </UserControl.Resources>

    <DockPanel>
        <TextBlock Name="pausedMessage"
                   DockPanel.Dock="Top"
                   Background="{DynamicResource VsBrush.InfoBackground}"
                   Padding="4"
                   VerticalAlignment="Top">
            The designer is paused waiting for a build to complete.
        </TextBlock>
        <DockPanel Name="toolbar"
                   DockPanel.Dock="Top"
                   Grid.Row="0"
                   Margin="4"
                   VerticalAlignment="Top">

            <DockPanel.Resources>
                <Style TargetType="ListBox">
                    <Setter Property="Background" Value="Transparent"/>
                    <Setter Property="BorderThickness" Value="0"/>
                    <Setter Property="ItemsPanel">
                        <Setter.Value>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal"/>
                            </ItemsPanelTemplate>
                        </Setter.Value>
                    </Setter>
                    <Setter Property="Margin" Value="0 0 10 0"/>
                    <Setter Property="DockPanel.Dock" Value="Right"/>
                </Style>
            </DockPanel.Resources>

            <ComboBox DockPanel.Dock="Right"
                      ItemsSource="{Binding Targets, ElementName=root}"
                      SelectedItem="{Binding SelectedTarget, ElementName=root}"
                      DisplayMemberPath="Name"
                      Padding="2"
                      Visibility="{Binding Targets, ElementName=root, Converter={StaticResource NotNullOrEmpty}}"
                      local:VsTheme.UseVsTheme="True" >
            </ComboBox>

            <ListBox SelectedIndex="{Binding View, ElementName=root, Mode=TwoWay, Converter={StaticResource EnumToInt}}">
                <ListBoxItem ToolTip="Split View">
                    <imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.Splitter}"/>
                </ListBoxItem>
                <ListBoxItem ToolTip="Design View">
                    <imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.HTMLDesignView}"/>
                </ListBoxItem>
                <ListBoxItem ToolTip="XAML View">
                    <imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.MarkupTag}"/>
                </ListBoxItem>
            </ListBox>

            <ListBox SelectedIndex="{Binding SplitOrientation, ElementName=root, Mode=TwoWay, Converter={StaticResource EnumToInt}}">
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
                <ListBoxItem ToolTip="Horizontal Layout">
                    <imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.SplitScreenHorizontally}"/>
                </ListBoxItem>
                <ListBoxItem ToolTip="Vertical Layout">
                    <imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.SplitScreenVertically}"/>
                </ListBoxItem>
            </ListBox>
            <Control/>
        </DockPanel>

        <Grid x:Name="mainGrid">
            <Grid.RowDefinitions>
                <RowDefinition x:Name="previewRow"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition x:Name="codeRow"/>
            </Grid.RowDefinitions>

            <local:AvaloniaPreviewer x:Name="previewer" Grid.Column="2"/>
            <StackPanel Name="error"
                        Grid.Column="2"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Visibility="Collapsed">
                <TextBlock Name="errorHeading" FontSize="18" HorizontalAlignment="Center"/>
                <TextBlock Name="errorMessage" Margin="0,20,0,0"/>
            </StackPanel>

            <GridSplitter x:Name="splitter"
                          Grid.Row="1"
                          Grid.Column="1"
                          Height="5"
                          HorizontalAlignment="Stretch"/>

            <Decorator Grid.Row="2" Grid.Column="0" Name="editorHost"/>
        </Grid>
    </DockPanel>
    
</UserControl>

{'fraction_non_alphanumeric': 0.11035007610350075, 'fraction_numerical': 0.0076103500761035, 'mean_word_length': 1.9044695481335954, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 141, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 22}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6799819', 'n_tokens_mistral': 3187, 'n_tokens_neox': 2845, 'n_words': 408}