<commit_before>﻿<!-- Copyright (c) <NAME>. All rights reserved. -->
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
<UserControl x:Class="Core2D.Avalonia.Views.EditorControl"
             xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:local="clr-namespace:Core2D.Avalonia;assembly=Core2D.Avalonia"
             xmlns:converters="clr-namespace:Core2D.Avalonia.Converters;assembly=Core2D.Avalonia"
             xmlns:Editor="clr-namespace:Core2D.Editor;assembly=Core2D.Editor"
             xmlns:Designer="clr-namespace:Core2D.Editor.Designer;assembly=Core2D.Editor"
             xmlns:paz="clr-namespace:Avalonia.Controls.PanAndZoom;assembly=Avalonia.Controls.PanAndZoom"
             xmlns:data="clr-namespace:Core2D.Avalonia.Controls.Data;assembly=Core2D.Avalonia"
             xmlns:path="clr-namespace:Core2D.Avalonia.Controls.Path;assembly=Core2D.Avalonia"
             xmlns:project="clr-namespace:Core2D.Avalonia.Controls.Containers;assembly=Core2D.Avalonia"
             xmlns:settings="clr-namespace:Core2D.Avalonia.Controls.Settings;assembly=Core2D.Avalonia"
             xmlns:shapes="clr-namespace:Core2D.Avalonia.Controls.Shapes;assembly=Core2D.Avalonia"
             xmlns:state="clr-namespace:Core2D.Avalonia.Controls.State;assembly=Core2D.Avalonia"
             xmlns:style="clr-namespace:Core2D.Avalonia.Controls.Style;assembly=Core2D.Avalonia"
             xmlns:editor="clr-namespace:Core2D.Avalonia.Controls.Editor;assembly=Core2D.Avalonia"
             xmlns:views="clr-namespace:Core2D.Avalonia.Views;assembly=Core2D.Avalonia"
             Design.DataContext="{Static Designer:DesignerContext.Editor}"
             Design.Width="1200" Design.Height="540">
    <Grid Name="rootPanel" ColumnDefinitions="180,Auto,*,Auto,240" RowDefinitions="*,Auto" Margin="6,6,6,2">
        <GridSplitter Name="leftPanelVSplitter" Classes="vertical" Grid.Column="1" Grid.Row="0" Width="6"/>
        <Grid Name="containerPanel" Grid.Row="0" Grid.Column="2">
            <Border Classes="container">
                <Border Classes="transparent" ClipToBounds="True">
                    <paz:ZoomBorder Name="zoomBorder" Stretch="None" ZoomSpeed="1.2" PanButton="Left" EnableInput="{Binding IsToolIdle}" Background="Transparent" ClipToBounds="False" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                        <views:ContainerViewControl Name="containerControl" Renderer="{Binding Renderers[0]}" Container="{Binding Project.CurrentContainer}" ClipToBounds="False"/>
                    </paz:ZoomBorder>
                </Border>
            </Border>
        </Grid>
        <Grid Name="leftPanel" RowDefinitions="50*,Auto,50*" Grid.Column="0" Grid.Row="0">
            <Border Name="leftPanelTop" Classes="leftTop" Grid.Row="0">
                <TabControl Classes="bottom">
                    <TabItem Header="Project" Classes="property">
                        <project:ProjectControl DataContext="{Binding Project}"/>
                    </TabItem>
                    <TabItem Header="Options" Classes="property">
                        <ContentControl Content="{Binding Project.Options}"/>
                    </TabItem>
                    <TabItem Header="Images" Classes="property">
                        <project:ImagesControl DataContext="{Binding Project}"/>
                    </TabItem>
                </TabControl>
            </Border>
            <GridSplitter Name="leftPanelHSplitter" Classes="horizontal" Grid.Row="1" Height="7"/>
            <Border Name="leftPanelBottom" Classes="leftBottom" Grid.Row="2">
                <TabControl Classes="bottom">
                    <TabItem Header="Groups" Classes="property">
                        <project:GroupsControl DataContext="{Binding Project}"/>
                    </TabItem>
                    <TabItem Header="Databases" Classes="property">
                        <project:DatabasesControl DataContext="{Binding Project}"/>
                    </TabItem>
                </TabControl>
            </Border>
        </Grid>
        <GridSplitter Name="rightPanelVSplitter" Classes="vertical" Grid.Column="3" Grid.Row="0" Width="6"/>
        <Grid Name="rightPanel" RowDefinitions="50*,Auto,50*" Grid.Column="4" Grid.Row="0">
            <Border Name="rightPanelTop" Classes="rightTop" Grid.Row="0">
                <TabControl Classes="bottom">
                    <TabItem Header="Styles" Classes="property">
                        <project:StylesControl DataContext="{Binding Project}"/>
                    </TabItem>
                    <TabItem Header="Templates" Classes="property">
                        <project:TemplatesControl DataContext="{Binding Project}"/>
                    </TabItem>
                    <TabItem Header="Container" Classes="property">
                        <ScrollViewer>
                            <ContentControl Content="{Binding Project.CurrentContainer}"/>
                        </ScrollViewer>
                    </TabItem>
                </TabControl>
            </Border>
            <GridSplitter Name="rightPanelHSplitter" Classes="horizontal" Grid.Row="1" Height="7"/>
            <Border Name="rightPanelBottom" Classes="rightBottom" Grid.Row="2">
                <TabControl Classes="bottom">
                    <TabItem Header="Tools" Classes="property">
                        <settings:ToolsControl DataContext="{Binding}"/>
                    </TabItem>
                    <TabItem Header="Shape" Classes="property">
                        <ScrollViewer>
                            <ContentControl Content="{Binding Project.CurrentContainer.CurrentShape}"/>
                        </ScrollViewer>
                    </TabItem>
                    <TabItem Header="Data" Classes="property">
                        <ScrollViewer>
                            <data:DataControl DataContext="{Binding Renderers[0].State.SelectedShape.Data}"/>
                        </ScrollViewer>
                    </TabItem>
                    <TabItem Header="Style" Classes="property">
                        <ScrollViewer>
                            <style:ShapeStyleControl DataContext="{Binding Project.CurrentStyleLibrary.Selected}"/>
                        </ScrollViewer>
                    </TabItem>
                    <TabItem Header="Template" Classes="property">
                        <ScrollViewer>
                            <ContentControl Content="{Binding Project.CurrentTemplate}"/>
                        </ScrollViewer>
                    </TabItem>
                </TabControl>
            </Border>
        </Grid>
        <Grid ColumnDefinitions="Auto,*" Grid.Column="0" Grid.ColumnSpan="5" Grid.Row="1" Margin="0,2,0,0">
            <TextBlock Name="statsPanel" Classes="stats" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center">
                <TextBlock.Text>
                    <MultiBinding Mode="OneWay" Converter="{Static converters:EditorToStatsMultiConverter.Instance}">
                        <Binding Path="Project.Documents.Length"/>
                        <Binding Path="Project.CurrentDocument.Pages.Length"/>
                        <Binding Path="Project.CurrentContainer.Layers.Length"/>
                        <Binding Path="Project.CurrentContainer.CurrentLayer.Shapes.Length"/>
                        <Binding Path="Renderers[0].State.SelectedShape" Converter="{Static converters:ObjectToObjectConverter.Instance}"/>
                        <Binding Path="Renderers[0].State.SelectedShapes" Converter="{Static converters:ObjectToObjectConverter.Instance}"/>
                    </MultiBinding>
                </TextBlock.Text>
            </TextBlock>
            <WrapPanel Name="optionsPanel" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center">
                <DropDown Classes="tool" Items="{Binding Tools}" SelectedItem="{Binding CurrentTool, Mode=TwoWay}">
                    <DropDown.DataTemplates>
                        <DataTemplate>
                            <TextBlock Text="{Binding Title}"/>
                        </DataTemplate>
                    </DropDown.DataTemplates>
                </DropDown>
                <DropDown Classes="tool" Items="{Binding PathTools}" SelectedItem="{Binding CurrentPathTool, Mode=TwoWay}">
                    <DropDown.DataTemplates>
                        <DataTemplate>
                            <TextBlock Text="{Binding Title}"/>
                        </DataTemplate>
                    </DropDown.DataTemplates>
                    <DropDown.IsVisible>
                        <MultiBinding Mode="OneWay" Converter="{Static converters:ObjectEqualityMultiConverter.Instance}">
                            <Binding Path="CurrentTool.Title"/>
                            <Binding Source="Path"/>
                        </MultiBinding>
                    </DropDown.IsVisible>
                </DropDown>
                <Button Content="Reset" Classes="autofit" Command="{Static Editor:ProjectEditorCommands.ZoomResetCommand}"/>
                <Button Content="AutoFit" Classes="autofit" Command="{Static Editor:ProjectEditorCommands.ZoomAutoFitCommand}"/>
                <DropDown Classes="autofit" Items="{Static paz:ZoomBorder.StretchModes}" SelectedItem="{Binding #zoomBorder.Stretch, Mode=TwoWay}"/>
                <TextBox Classes="autofit" Text="{Binding #zoomBorder.ZoomSpeed, Mode=TwoWay}" Width="50"/>
                <CheckBox Classes="options" Content="Stroked" IsChecked="{Binding Project.Options.DefaultIsStroked, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="Filled" IsChecked="{Binding Project.Options.DefaultIsFilled, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="Closed" IsChecked="{Binding Project.Options.DefaultIsClosed, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="SmoothJoin" IsChecked="{Binding Project.Options.DefaultIsSmoothJoin, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="Snap" IsChecked="{Binding Project.Options.SnapToGrid, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="Connect" IsChecked="{Binding Project.Options.TryToConnect, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="CloneStyle" IsChecked="{Binding Project.Options.CloneStyle, Mode=TwoWay}"/>
            </WrapPanel>
        </Grid> 
    </Grid>
</UserControl>
<commit_msg>Update EditorControl.xaml<commit_after>﻿<!-- Copyright (c) <NAME>. All rights reserved. -->
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
<UserControl x:Class="Core2D.Avalonia.Views.EditorControl"
             xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:local="clr-namespace:Core2D.Avalonia;assembly=Core2D.Avalonia"
             xmlns:converters="clr-namespace:Core2D.Avalonia.Converters;assembly=Core2D.Avalonia"
             xmlns:Editor="clr-namespace:Core2D.Editor;assembly=Core2D.Editor"
             xmlns:Designer="clr-namespace:Core2D.Editor.Designer;assembly=Core2D.Editor"
             xmlns:paz="clr-namespace:Avalonia.Controls.PanAndZoom;assembly=Avalonia.Controls.PanAndZoom"
             xmlns:data="clr-namespace:Core2D.Avalonia.Controls.Data;assembly=Core2D.Avalonia"
             xmlns:path="clr-namespace:Core2D.Avalonia.Controls.Path;assembly=Core2D.Avalonia"
             xmlns:project="clr-namespace:Core2D.Avalonia.Controls.Containers;assembly=Core2D.Avalonia"
             xmlns:settings="clr-namespace:Core2D.Avalonia.Controls.Settings;assembly=Core2D.Avalonia"
             xmlns:shapes="clr-namespace:Core2D.Avalonia.Controls.Shapes;assembly=Core2D.Avalonia"
             xmlns:state="clr-namespace:Core2D.Avalonia.Controls.State;assembly=Core2D.Avalonia"
             xmlns:style="clr-namespace:Core2D.Avalonia.Controls.Style;assembly=Core2D.Avalonia"
             xmlns:editor="clr-namespace:Core2D.Avalonia.Controls.Editor;assembly=Core2D.Avalonia"
             xmlns:views="clr-namespace:Core2D.Avalonia.Views;assembly=Core2D.Avalonia"
             Design.DataContext="{Static Designer:DesignerContext.Editor}"
             Design.Width="1200" Design.Height="540">
    <Grid Name="rootPanel" ColumnDefinitions="180,Auto,*,Auto,240" RowDefinitions="*,Auto" Margin="6,6,6,2">
        <GridSplitter Name="leftPanelVSplitter" Classes="vertical" Grid.Column="1" Grid.Row="0" Width="6"/>
        <Grid Name="containerPanel" Grid.Row="0" Grid.Column="2">
            <Border Classes="container">
                <Border Classes="transparent" ClipToBounds="True">
                    <paz:ZoomBorder Name="zoomBorder" Stretch="None" ZoomSpeed="1.2" PanButton="Right" EnableInput="{Binding IsToolIdle}" Background="Transparent" ClipToBounds="False" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                        <views:ContainerViewControl Name="containerControl" Renderer="{Binding Renderers[0]}" Container="{Binding Project.CurrentContainer}" ClipToBounds="False"/>
                    </paz:ZoomBorder>
                </Border>
            </Border>
        </Grid>
        <Grid Name="leftPanel" RowDefinitions="50*,Auto,50*" Grid.Column="0" Grid.Row="0">
            <Border Name="leftPanelTop" Classes="leftTop" Grid.Row="0">
                <TabControl Classes="bottom">
                    <TabItem Header="Project" Classes="property">
                        <project:ProjectControl DataContext="{Binding Project}"/>
                    </TabItem>
                    <TabItem Header="Options" Classes="property">
                        <ContentControl Content="{Binding Project.Options}"/>
                    </TabItem>
                    <TabItem Header="Images" Classes="property">
                        <project:ImagesControl DataContext="{Binding Project}"/>
                    </TabItem>
                </TabControl>
            </Border>
            <GridSplitter Name="leftPanelHSplitter" Classes="horizontal" Grid.Row="1" Height="7"/>
            <Border Name="leftPanelBottom" Classes="leftBottom" Grid.Row="2">
                <TabControl Classes="bottom">
                    <TabItem Header="Groups" Classes="property">
                        <project:GroupsControl DataContext="{Binding Project}"/>
                    </TabItem>
                    <TabItem Header="Databases" Classes="property">
                        <project:DatabasesControl DataContext="{Binding Project}"/>
                    </TabItem>
                </TabControl>
            </Border>
        </Grid>
        <GridSplitter Name="rightPanelVSplitter" Classes="vertical" Grid.Column="3" Grid.Row="0" Width="6"/>
        <Grid Name="rightPanel" RowDefinitions="50*,Auto,50*" Grid.Column="4" Grid.Row="0">
            <Border Name="rightPanelTop" Classes="rightTop" Grid.Row="0">
                <TabControl Classes="bottom">
                    <TabItem Header="Styles" Classes="property">
                        <project:StylesControl DataContext="{Binding Project}"/>
                    </TabItem>
                    <TabItem Header="Templates" Classes="property">
                        <project:TemplatesControl DataContext="{Binding Project}"/>
                    </TabItem>
                    <TabItem Header="Container" Classes="property">
                        <ScrollViewer>
                            <ContentControl Content="{Binding Project.CurrentContainer}"/>
                        </ScrollViewer>
                    </TabItem>
                </TabControl>
            </Border>
            <GridSplitter Name="rightPanelHSplitter" Classes="horizontal" Grid.Row="1" Height="7"/>
            <Border Name="rightPanelBottom" Classes="rightBottom" Grid.Row="2">
                <TabControl Classes="bottom">
                    <TabItem Header="Tools" Classes="property">
                        <settings:ToolsControl DataContext="{Binding}"/>
                    </TabItem>
                    <TabItem Header="Shape" Classes="property">
                        <ScrollViewer>
                            <ContentControl Content="{Binding Project.CurrentContainer.CurrentShape}"/>
                        </ScrollViewer>
                    </TabItem>
                    <TabItem Header="Data" Classes="property">
                        <ScrollViewer>
                            <data:DataControl DataContext="{Binding Renderers[0].State.SelectedShape.Data}"/>
                        </ScrollViewer>
                    </TabItem>
                    <TabItem Header="Style" Classes="property">
                        <ScrollViewer>
                            <style:ShapeStyleControl DataContext="{Binding Project.CurrentStyleLibrary.Selected}"/>
                        </ScrollViewer>
                    </TabItem>
                    <TabItem Header="Template" Classes="property">
                        <ScrollViewer>
                            <ContentControl Content="{Binding Project.CurrentTemplate}"/>
                        </ScrollViewer>
                    </TabItem>
                </TabControl>
            </Border>
        </Grid>
        <Grid ColumnDefinitions="Auto,*" Grid.Column="0" Grid.ColumnSpan="5" Grid.Row="1" Margin="0,2,0,0">
            <TextBlock Name="statsPanel" Classes="stats" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center">
                <TextBlock.Text>
                    <MultiBinding Mode="OneWay" Converter="{Static converters:EditorToStatsMultiConverter.Instance}">
                        <Binding Path="Project.Documents.Length"/>
                        <Binding Path="Project.CurrentDocument.Pages.Length"/>
                        <Binding Path="Project.CurrentContainer.Layers.Length"/>
                        <Binding Path="Project.CurrentContainer.CurrentLayer.Shapes.Length"/>
                        <Binding Path="Renderers[0].State.SelectedShape" Converter="{Static converters:ObjectToObjectConverter.Instance}"/>
                        <Binding Path="Renderers[0].State.SelectedShapes" Converter="{Static converters:ObjectToObjectConverter.Instance}"/>
                    </MultiBinding>
                </TextBlock.Text>
            </TextBlock>
            <WrapPanel Name="optionsPanel" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center">
                <DropDown Classes="tool" Items="{Binding Tools}" SelectedItem="{Binding CurrentTool, Mode=TwoWay}">
                    <DropDown.DataTemplates>
                        <DataTemplate>
                            <TextBlock Text="{Binding Title}"/>
                        </DataTemplate>
                    </DropDown.DataTemplates>
                </DropDown>
                <DropDown Classes="tool" Items="{Binding PathTools}" SelectedItem="{Binding CurrentPathTool, Mode=TwoWay}">
                    <DropDown.DataTemplates>
                        <DataTemplate>
                            <TextBlock Text="{Binding Title}"/>
                        </DataTemplate>
                    </DropDown.DataTemplates>
                    <DropDown.IsVisible>
                        <MultiBinding Mode="OneWay" Converter="{Static converters:ObjectEqualityMultiConverter.Instance}">
                            <Binding Path="CurrentTool.Title"/>
                            <Binding Source="Path"/>
                        </MultiBinding>
                    </DropDown.IsVisible>
                </DropDown>
                <Button Content="Reset" Classes="autofit" Command="{Static Editor:ProjectEditorCommands.ZoomResetCommand}"/>
                <Button Content="AutoFit" Classes="autofit" Command="{Static Editor:ProjectEditorCommands.ZoomAutoFitCommand}"/>
                <DropDown Classes="autofit" Items="{Static paz:ZoomBorder.StretchModes}" SelectedItem="{Binding #zoomBorder.Stretch, Mode=TwoWay}"/>
                <TextBox Classes="autofit" Text="{Binding #zoomBorder.ZoomSpeed, Mode=TwoWay}" Width="50"/>
                <CheckBox Classes="options" Content="Stroked" IsChecked="{Binding Project.Options.DefaultIsStroked, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="Filled" IsChecked="{Binding Project.Options.DefaultIsFilled, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="Closed" IsChecked="{Binding Project.Options.DefaultIsClosed, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="SmoothJoin" IsChecked="{Binding Project.Options.DefaultIsSmoothJoin, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="Snap" IsChecked="{Binding Project.Options.SnapToGrid, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="Connect" IsChecked="{Binding Project.Options.TryToConnect, Mode=TwoWay}"/>
                <CheckBox Classes="options" Content="CloneStyle" IsChecked="{Binding Project.Options.CloneStyle, Mode=TwoWay}"/>
            </WrapPanel>
        </Grid> 
    </Grid>
</UserControl>

{'fraction_non_alphanumeric': 0.12582719294128691, 'fraction_numerical': 0.008729525508048999, 'mean_word_length': 2.1893429127376143, 'pattern_counts': {'":': 0, '<': 275, '<?xml version=': 0, '>': 275, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 34}, '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': '519109', 'n_tokens_mistral': 5676, 'n_tokens_neox': 5211, 'n_words': 799}