<commit_before><!-- Copyright (c) <NAME>. All rights reserved. -->
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
<Window x:Class="Core2D.Wpf.Windows.MainWindow" 
        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:Core2D.Wpf" 
        xmlns:converters="clr-namespace:Core2D.Wpf.Converters" 
        xmlns:designer="clr-namespace:Core2D.Wpf.Designer"
        xmlns:Editor="clr-namespace:Core2D.Editor;assembly=Core2D" 
        xmlns:Views="clr-namespace:Core2D.Editor.Views;assembly=Core2D" 
        xmlns:views="clr-namespace:Core2D.Wpf.Views"
        xmlns:p="clr-namespace:Core2D.Wpf.Properties" 
        mc:Ignorable="d" 
        d:DataContext="{x:Static designer:DesignerHelper.Editor}"
        Width="1324" Height="724"
        Background="{StaticResource BackgroundColor}" 
        WindowStartupLocation="CenterScreen" WindowState="Maximized" 
        UseLayoutRounding="True" SnapsToDevicePixels="True" 
        TextOptions.TextFormattingMode="Display" TextOptions.TextHintingMode="Auto" TextOptions.TextRenderingMode="Auto">
    <Window.Title>
        <MultiBinding StringFormat="{}{0}{1} - Core2D" FallbackValue="Core2D" TargetNullValue="Core2D">
            <Binding Path="Project.Name"/>
            <Binding Path="IsProjectDirty" Converter="{StaticResource BooleanToStarConverter}"/>
        </MultiBinding>
    </Window.Title>
    <Window.InputBindings>
        <KeyBinding Command="{x:Static Editor:Commands.NewCommand}" CommandParameter="{Binding}" Gesture="Ctrl+N"/>
        <KeyBinding Command="{x:Static Editor:Commands.OpenCommand}" Gesture="Ctrl+O"/>
        <KeyBinding Command="{x:Static Editor:Commands.CloseCommand}" Gesture="Ctrl+F4"/>
        <KeyBinding Command="{x:Static Editor:Commands.SaveCommand}" Gesture="Ctrl+S"/>
        <KeyBinding Command="{x:Static Editor:Commands.SaveAsCommand}" Gesture="Ctrl+Shift+S"/>
        <KeyBinding Command="{x:Static Editor:Commands.ImportXamlCommand}" Gesture="Ctrl+Shift+X"/>
        <KeyBinding Command="{x:Static Editor:Commands.ImportJsonCommand}" Gesture="Ctrl+Shift+J"/>
        <KeyBinding Command="{x:Static Editor:Commands.ExportCommand}" Gesture="Ctrl+E"/>
        <KeyBinding Command="{x:Static Editor:Commands.ExitCommand}" Gesture="Alt+F4"/>
        <KeyBinding Command="{x:Static Editor:Commands.UndoCommand}" Gesture="Ctrl+Z"/>
        <KeyBinding Command="{x:Static Editor:Commands.RedoCommand}" Gesture="Ctrl+Y"/>
        <KeyBinding Command="{x:Static Editor:Commands.CopyAsEmfCommand}" Gesture="Ctrl+Shift+C"/>
        <KeyBinding Command="{x:Static Editor:Commands.CutCommand}" Gesture="Ctrl+X"/>
        <KeyBinding Command="{x:Static Editor:Commands.CopyCommand}" Gesture="Ctrl+C"/>
        <KeyBinding Command="{x:Static Editor:Commands.PasteCommand}" Gesture="Ctrl+V"/>
        <KeyBinding Command="{x:Static Editor:Commands.SelectAllCommand}" Gesture="Ctrl+A"/>
        <KeyBinding Command="{x:Static Editor:Commands.GroupCommand}" Gesture="Ctrl+G"/>
        <KeyBinding Command="{x:Static Editor:Commands.UngroupCommand}" Gesture="Ctrl+U"/>
    </Window.InputBindings>
    <ContentControl Content="{Binding CurrentView, Mode=TwoWay}">
        <ContentControl.Resources>
            <DataTemplate DataType="{x:Type Views:DashboardView}">
                <Grid FocusVisualStyle="{x:Null}" DataContext="{Binding Context, Mode=TwoWay}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="3"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="3"/>
                    </Grid.RowDefinitions>
                    <views:DashboardMenuControl Grid.Row="0"/>
                    <views:DashboardControl Grid.Row="2"/>
                </Grid>
            </DataTemplate>
            <DataTemplate DataType="{x:Type Views:EditorView}">
                <Grid FocusVisualStyle="{x:Null}" DataContext="{Binding Context, Mode=TwoWay}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="3"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="3"/>
                    </Grid.RowDefinitions>
                    <views:EditorMenuControl Grid.Row="0"/>
                    <views:EditorControl Grid.Row="2"/>
                </Grid>
            </DataTemplate>
        </ContentControl.Resources>
    </ContentControl>
</Window><commit_msg>Make context one way binding<commit_after><!-- Copyright (c) <NAME>. All rights reserved. -->
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
<Window x:Class="Core2D.Wpf.Windows.MainWindow" 
        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:Core2D.Wpf" 
        xmlns:converters="clr-namespace:Core2D.Wpf.Converters" 
        xmlns:designer="clr-namespace:Core2D.Wpf.Designer"
        xmlns:Editor="clr-namespace:Core2D.Editor;assembly=Core2D" 
        xmlns:Views="clr-namespace:Core2D.Editor.Views;assembly=Core2D" 
        xmlns:views="clr-namespace:Core2D.Wpf.Views"
        xmlns:p="clr-namespace:Core2D.Wpf.Properties" 
        mc:Ignorable="d" 
        d:DataContext="{x:Static designer:DesignerHelper.Editor}"
        Width="1324" Height="724"
        Background="{StaticResource BackgroundColor}" 
        WindowStartupLocation="CenterScreen" WindowState="Maximized" 
        UseLayoutRounding="True" SnapsToDevicePixels="True" 
        TextOptions.TextFormattingMode="Display" TextOptions.TextHintingMode="Auto" TextOptions.TextRenderingMode="Auto">
    <Window.Title>
        <MultiBinding StringFormat="{}{0}{1} - Core2D" FallbackValue="Core2D" TargetNullValue="Core2D">
            <Binding Path="Project.Name"/>
            <Binding Path="IsProjectDirty" Converter="{StaticResource BooleanToStarConverter}"/>
        </MultiBinding>
    </Window.Title>
    <Window.InputBindings>
        <KeyBinding Command="{x:Static Editor:Commands.NewCommand}" CommandParameter="{Binding}" Gesture="Ctrl+N"/>
        <KeyBinding Command="{x:Static Editor:Commands.OpenCommand}" Gesture="Ctrl+O"/>
        <KeyBinding Command="{x:Static Editor:Commands.CloseCommand}" Gesture="Ctrl+F4"/>
        <KeyBinding Command="{x:Static Editor:Commands.SaveCommand}" Gesture="Ctrl+S"/>
        <KeyBinding Command="{x:Static Editor:Commands.SaveAsCommand}" Gesture="Ctrl+Shift+S"/>
        <KeyBinding Command="{x:Static Editor:Commands.ImportXamlCommand}" Gesture="Ctrl+Shift+X"/>
        <KeyBinding Command="{x:Static Editor:Commands.ImportJsonCommand}" Gesture="Ctrl+Shift+J"/>
        <KeyBinding Command="{x:Static Editor:Commands.ExportCommand}" Gesture="Ctrl+E"/>
        <KeyBinding Command="{x:Static Editor:Commands.ExitCommand}" Gesture="Alt+F4"/>
        <KeyBinding Command="{x:Static Editor:Commands.UndoCommand}" Gesture="Ctrl+Z"/>
        <KeyBinding Command="{x:Static Editor:Commands.RedoCommand}" Gesture="Ctrl+Y"/>
        <KeyBinding Command="{x:Static Editor:Commands.CopyAsEmfCommand}" Gesture="Ctrl+Shift+C"/>
        <KeyBinding Command="{x:Static Editor:Commands.CutCommand}" Gesture="Ctrl+X"/>
        <KeyBinding Command="{x:Static Editor:Commands.CopyCommand}" Gesture="Ctrl+C"/>
        <KeyBinding Command="{x:Static Editor:Commands.PasteCommand}" Gesture="Ctrl+V"/>
        <KeyBinding Command="{x:Static Editor:Commands.SelectAllCommand}" Gesture="Ctrl+A"/>
        <KeyBinding Command="{x:Static Editor:Commands.GroupCommand}" Gesture="Ctrl+G"/>
        <KeyBinding Command="{x:Static Editor:Commands.UngroupCommand}" Gesture="Ctrl+U"/>
    </Window.InputBindings>
    <ContentControl Content="{Binding CurrentView, Mode=TwoWay}">
        <ContentControl.Resources>
            <DataTemplate DataType="{x:Type Views:DashboardView}">
                <Grid FocusVisualStyle="{x:Null}" DataContext="{Binding Context}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="3"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="3"/>
                    </Grid.RowDefinitions>
                    <views:DashboardMenuControl Grid.Row="0"/>
                    <views:DashboardControl Grid.Row="2"/>
                </Grid>
            </DataTemplate>
            <DataTemplate DataType="{x:Type Views:EditorView}">
                <Grid FocusVisualStyle="{x:Null}" DataContext="{Binding Context}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="3"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="3"/>
                    </Grid.RowDefinitions>
                    <views:EditorMenuControl Grid.Row="0"/>
                    <views:EditorControl Grid.Row="2"/>
                </Grid>
            </DataTemplate>
        </ContentControl.Resources>
    </ContentControl>
</Window>
{'fraction_non_alphanumeric': 0.14414414414414414, 'fraction_numerical': 0.009940975458216837, 'mean_word_length': 3.0562788744225116, 'pattern_counts': {'":': 0, '<': 121, '<?xml version=': 0, '>': 121, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 24}, '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': '5380887', 'n_tokens_mistral': 2804, 'n_tokens_neox': 2639, 'n_words': 391}