<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.Wpf.Views.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:Core2D.Wpf.Controls"
        xmlns:ViewsStyle="clr-namespace:Core2D.Wpf.Views.Style"
        xmlns:ViewsToolsSettings="clr-namespace:Core2D.Wpf.Views.Tools.Settings"
        xmlns:ViewsIntersectionsLineSettings="clr-namespace:Core2D.Wpf.Views.Intersections.Line.Settings"
        xmlns:ViewsFiltersSettings="clr-namespace:Core2D.Wpf.Views.Filters.Settings"
        xmlns:EditorTools="clr-namespace:Core2D.Editor.Tools;assembly=Core2D.Editor"
        xmlns:EditorIntersectionsLine="clr-namespace:Core2D.Editor.Intersections.Line;assembly=Core2D.Editor"
        xmlns:EditorFilters="clr-namespace:Core2D.Editor.Filters;assembly=Core2D.Editor"
        UseLayoutRounding="True" SnapsToDevicePixels="True" TextOptions.TextFormattingMode="Display"
        Focusable="True">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="5"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="250"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="250"/>
        </Grid.ColumnDefinitions>
        <Menu Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Background="Transparent">
            <MenuItem Header="_File">
                <MenuItem Header="New" x:Name="FileNew" Click="FileNew_Click"/>
                <Separator/>
                <MenuItem Header="_Open..." x:Name="FileOpen" Click="FileOpen_Click"/>
                <Separator/>
                <MenuItem Header="Save _As..." x:Name="FileSaveAs" Click="FileSaveAs_Click"/>
                <Separator/>
                <MenuItem Header="E_xit" x:Name="FileExit" Click="FileExit_Click"/>
            </MenuItem>
            <MenuItem Header="_Edit">
                <MenuItem Header="Cut" x:Name="EditCut" Click="EditCut_Click"/>
                <MenuItem Header="Copy" x:Name="EditCopy" Click="EditCopy_Click"/>
                <MenuItem Header="Paste" x:Name="EditPaste" Click="EditPaste_Click"/>
                <MenuItem Header="Delete" x:Name="EditDelete" Click="EditDelete_Click"/>
                <Separator/>
                <MenuItem Header="Group" x:Name="EditGroup" Click="EditGroup_Click"/>
                <Separator/>
                <MenuItem Header="Select All" x:Name="EditSelectAll" Click="EditSelectAll_Click"/>
            </MenuItem>
        </Menu>
        <Grid Grid.Row="2" Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="50*"/>
                <RowDefinition Height="50*"/>
            </Grid.RowDefinitions>
            <TabControl Grid.Row="0">
                <TabItem Header="Tools">
                    <ListBox ItemsSource="{Binding Tools}" SelectedItem="{Binding CurrentTool}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Title}"/>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </TabItem>
            </TabControl>
            <TabControl Grid.Row="1">
                <TabItem Header="Style">
                    <ViewsStyle:DrawStyleView DataContext="{Binding CurrentStyle}"/>
                </TabItem>
            </TabControl>
        </Grid>
        <Controls:LayerContainerInputView x:Name="inputView" Grid.Row="2" Grid.Column="1" Background="Transparent" ClipToBounds="True">
            <Controls:LayerContainerRenderView x:Name="rendererView" Width="{Binding CurrentContainer.Width}" Height="{Binding CurrentContainer.Height}" Background="SlateGray" VerticalAlignment="Center" HorizontalAlignment="Center"/>
        </Controls:LayerContainerInputView>
        <Grid Grid.Row="2" Grid.Column="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="50*"/>
                <RowDefinition Height="50*"/>
            </Grid.RowDefinitions>
            <TabControl Grid.Row="0">
                <TabItem Header="Shapes">
                    <ListBox ItemsSource="{Binding CurrentContainer.Shapes}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding}"/>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </TabItem>
                <TabItem Header="Guides">
                    <ListBox ItemsSource="{Binding CurrentContainer.Guides}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding}"/>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </TabItem>
                <TabItem Header="Working">
                    <ListBox ItemsSource="{Binding WorkingContainer.Shapes}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding}"/>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </TabItem>
                <TabItem Header="Container">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="50"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Column="0" Grid.Row="0" Text="Width"/>
                        <TextBox Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0" Text="{Binding CurrentContainer.Width, UpdateSourceTrigger=PropertyChanged}"/>
                        <TextBlock Grid.Column="0" Grid.Row="1" Text="Height"/>
                        <TextBox Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" Text="{Binding CurrentContainer.Height, UpdateSourceTrigger=PropertyChanged}"/>
                    </Grid>
                </TabItem>
            </TabControl>
            <TabControl Grid.Row="1">
                <TabItem Header="Settings">
                    <ContentControl Content="{Binding CurrentTool.Settings}">
                        <ContentControl.Resources>
                            <DataTemplate DataType="{x:Type EditorTools:NoneToolSettings}">
                                <ViewsToolsSettings:NoneToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:SelectionToolSettings}">
                                <ViewsToolsSettings:SelectionToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:GuideToolSettings}">
                                <ViewsToolsSettings:GuideToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:PointToolSettings}">
                                <ViewsToolsSettings:PointToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:LineToolSettings}">
                                <ViewsToolsSettings:LineToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:PolyLineToolSettings}">
                                <ViewsToolsSettings:PolyLineToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:CubicBezierToolSettings}">
                                <ViewsToolsSettings:CubicBezierToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:QuadraticBezierToolSettings}">
                                <ViewsToolsSettings:QuadraticBezierToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:PathToolSettings}">
                                <ViewsToolsSettings:PathToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:ScribbleToolSettings}">
                                <ViewsToolsSettings:ScribbleToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:RectangleToolSettings}">
                                <ViewsToolsSettings:RectangleToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:EllipseToolSettings}">
                                <ViewsToolsSettings:EllipseToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:TextToolSettings}">
                                <ViewsToolsSettings:TextToolSettingsView/>
                            </DataTemplate>
                        </ContentControl.Resources>
                    </ContentControl>
                </TabItem>
                <TabItem Header="Intersections">
                    <Grid Grid.Row="2" Grid.Column="2">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <ComboBox Grid.Row="0" x:Name="Intersections" ItemsSource="{Binding CurrentTool.Intersections}" SelectedIndex="0">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Title}"/>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>
                        <ContentControl Grid.Row="1" Content="{Binding ElementName=Intersections, Path=SelectedItem.Settings}">
                            <ContentControl.Resources>
                                <DataTemplate DataType="{x:Type EditorIntersectionsLine:LineLineSettings}">
                                    <ViewsIntersectionsLineSettings:LineLineSettingsView/>
                                </DataTemplate>
                                <DataTemplate DataType="{x:Type EditorIntersectionsLine:RectangleLineSettings}">
                                    <ViewsIntersectionsLineSettings:RectangleLineSettingsView/>
                                </DataTemplate>
                                <DataTemplate DataType="{x:Type EditorIntersectionsLine:EllipseLineSettings}">
                                    <ViewsIntersectionsLineSettings:EllipseLineSettingsView/>
                                </DataTemplate>
                            </ContentControl.Resources><commit_msg>Cleanup 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.Wpf.Views.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:Core2D.Wpf.Controls"
        xmlns:ViewsStyle="clr-namespace:Core2D.Wpf.Views.Style"
        xmlns:ViewsToolsSettings="clr-namespace:Core2D.Wpf.Views.Tools.Settings"
        xmlns:ViewsIntersectionsLineSettings="clr-namespace:Core2D.Wpf.Views.Intersections.Line.Settings"
        xmlns:ViewsFiltersSettings="clr-namespace:Core2D.Wpf.Views.Filters.Settings"
        xmlns:EditorTools="clr-namespace:Core2D.Editor.Tools;assembly=Core2D.Editor"
        xmlns:EditorIntersectionsLine="clr-namespace:Core2D.Editor.Intersections.Line;assembly=Core2D.Editor"
        xmlns:EditorFilters="clr-namespace:Core2D.Editor.Filters;assembly=Core2D.Editor"
        UseLayoutRounding="True" SnapsToDevicePixels="True" TextOptions.TextFormattingMode="Display"
        Focusable="True">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="5"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="250"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="250"/>
        </Grid.ColumnDefinitions>
        <Menu Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Background="Transparent">
            <MenuItem Header="_File">
                <MenuItem Header="New" x:Name="FileNew" Click="FileNew_Click"/>
                <Separator/>
                <MenuItem Header="_Open..." x:Name="FileOpen" Click="FileOpen_Click"/>
                <Separator/>
                <MenuItem Header="Save _As..." x:Name="FileSaveAs" Click="FileSaveAs_Click"/>
                <Separator/>
                <MenuItem Header="E_xit" x:Name="FileExit" Click="FileExit_Click"/>
            </MenuItem>
            <MenuItem Header="_Edit">
                <MenuItem Header="Cut" x:Name="EditCut" Click="EditCut_Click"/>
                <MenuItem Header="Copy" x:Name="EditCopy" Click="EditCopy_Click"/>
                <MenuItem Header="Paste" x:Name="EditPaste" Click="EditPaste_Click"/>
                <MenuItem Header="Delete" x:Name="EditDelete" Click="EditDelete_Click"/>
                <Separator/>
                <MenuItem Header="Group" x:Name="EditGroup" Click="EditGroup_Click"/>
                <Separator/>
                <MenuItem Header="Select All" x:Name="EditSelectAll" Click="EditSelectAll_Click"/>
            </MenuItem>
        </Menu>
        <Grid Grid.Row="2" Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="50*"/>
                <RowDefinition Height="50*"/>
            </Grid.RowDefinitions>
            <TabControl Grid.Row="0">
                <TabItem Header="Tools">
                    <ListBox ItemsSource="{Binding Tools}" SelectedItem="{Binding CurrentTool}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Title}"/>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </TabItem>
            </TabControl>
            <TabControl Grid.Row="1">
                <TabItem Header="Style">
                    <ViewsStyle:DrawStyleView DataContext="{Binding CurrentStyle}"/>
                </TabItem>
            </TabControl>
        </Grid>
        <Controls:LayerContainerInputView x:Name="inputView" Grid.Row="2" Grid.Column="1" Background="Transparent" ClipToBounds="True">
            <Controls:LayerContainerRenderView x:Name="rendererView" Width="{Binding CurrentContainer.Width}" Height="{Binding CurrentContainer.Height}" Background="SlateGray" VerticalAlignment="Center" HorizontalAlignment="Center"/>
        </Controls:LayerContainerInputView>
        <Grid Grid.Row="2" Grid.Column="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="50*"/>
                <RowDefinition Height="50*"/>
            </Grid.RowDefinitions>
            <TabControl Grid.Row="0">
                <TabItem Header="Shapes">
                    <ListBox ItemsSource="{Binding CurrentContainer.Shapes}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding}"/>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </TabItem>
                <TabItem Header="Guides">
                    <ListBox ItemsSource="{Binding CurrentContainer.Guides}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding}"/>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </TabItem>
                <TabItem Header="Working">
                    <ListBox ItemsSource="{Binding WorkingContainer.Shapes}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding}"/>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </TabItem>
                <TabItem Header="Container">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="50"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Column="0" Grid.Row="0" Text="Width"/>
                        <TextBox Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0" Text="{Binding CurrentContainer.Width, UpdateSourceTrigger=PropertyChanged}"/>
                        <TextBlock Grid.Column="0" Grid.Row="1" Text="Height"/>
                        <TextBox Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" Text="{Binding CurrentContainer.Height, UpdateSourceTrigger=PropertyChanged}"/>
                    </Grid>
                </TabItem>
            </TabControl>
            <TabControl Grid.Row="1">
                <TabItem Header="Settings">
                    <ContentControl Content="{Binding CurrentTool.Settings}">
                        <ContentControl.Resources>
                            <DataTemplate DataType="{x:Type EditorTools:NoneToolSettings}">
                                <ViewsToolsSettings:NoneToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:SelectionToolSettings}">
                                <ViewsToolsSettings:SelectionToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:GuideToolSettings}">
                                <ViewsToolsSettings:GuideToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:PointToolSettings}">
                                <ViewsToolsSettings:PointToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:LineToolSettings}">
                                <ViewsToolsSettings:LineToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:PolyLineToolSettings}">
                                <ViewsToolsSettings:PolyLineToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:CubicBezierToolSettings}">
                                <ViewsToolsSettings:CubicBezierToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:QuadraticBezierToolSettings}">
                                <ViewsToolsSettings:QuadraticBezierToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:PathToolSettings}">
                                <ViewsToolsSettings:PathToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:ScribbleToolSettings}">
                                <ViewsToolsSettings:ScribbleToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:RectangleToolSettings}">
                                <ViewsToolsSettings:RectangleToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:EllipseToolSettings}">
                                <ViewsToolsSettings:EllipseToolSettingsView/>
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type EditorTools:TextToolSettings}">
                                <ViewsToolsSettings:TextToolSettingsView/>
                            </DataTemplate>
                        </ContentControl.Resources>
                    </ContentControl>
                </TabItem>
                <TabItem Header="Intersections">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <ComboBox Grid.Row="0" x:Name="Intersections" ItemsSource="{Binding CurrentTool.Intersections}" SelectedIndex="0">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Title}"/>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>
                        <ContentControl Grid.Row="1" Content="{Binding ElementName=Intersections, Path=SelectedItem.Settings}">
                            <ContentControl.Resources>
                                <DataTemplate DataType="{x:Type EditorIntersectionsLine:LineLineSettings}">
                                    <ViewsIntersectionsLineSettings:LineLineSettingsView/>
                                </DataTemplate>
                                <DataTemplate DataType="{x:Type EditorIntersectionsLine:RectangleLineSettings}">
                                    <ViewsIntersectionsLineSettings:RectangleLineSettingsView/>
                                </DataTemplate>
                                <DataTemplate DataType="{x:Type EditorIntersectionsLine:EllipseLineSettings}">
                                    <ViewsIntersectionsLineSettings:EllipseLineSettingsView/>
                                </DataTemplate>
                            </ContentControl.Resources>
{'fraction_non_alphanumeric': 0.10536660399931636, 'fraction_numerical': 0.0054691505725517, 'mean_word_length': 1.5053521729822308, 'pattern_counts': {'":': 0, '<': 369, '<?xml version=': 0, '>': 369, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 20}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4872813', 'n_tokens_mistral': 5524, 'n_tokens_neox': 5131, 'n_words': 766}