<commit_before>﻿<local:PageBase
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:UwpDeepDive.MainApp.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModels="using:UwpDeepDive.MainApp.ViewModels"
    x:Class="UwpDeepDive.MainApp.Views.XamlPage"
    mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:XamlPageVm, d:IsDesignTimeCreatable=True}">
    <local:PageBase.Resources>
        <DataTemplate x:Key="DataTemplate_Binding">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock Text="{Binding Title}" Grid.Column="1"/>
                <TextBlock Text="{Binding Date}" Grid.Row="1" Grid.Column="1"/>
                <Image Grid.RowSpan="2" Source="{Binding ImageUri}" Height="60" Width="60" Margin="0,0,10,0"/>
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="DataTemplate_XBind" x:DataType="viewModels:NewsItemVmi">
            <RelativePanel>
                <Image x:Name="image" Source="{x:Bind ImageUri}"
                       x:Phase="2" Height="60" Width="60" Margin="0,0,8,0"/>
                <TextBlock x:Name="title" Text="{x:Bind Title}" 
                           RelativePanel.RightOf="image" />
                <TextBlock x:Name="date" Text="{x:Bind Date}" 
                           RelativePanel.RightOf="image" RelativePanel.Below="title"
                           x:Phase="1"/>
            </RelativePanel>
        </DataTemplate>
    </local:PageBase.Resources>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="VisualStates">
                <VisualState x:Name="Narrow"/>
                <VisualState x:Name="MediumWide">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="600"/>
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="button.(UIElement.Visibility)" Value="Visible"/>
                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="FullWide">
                    <VisualState.Setters>
                        <Setter Target="button.(UIElement.Visibility)" Value="Visible"/>
                        <Setter Target="_lazyImage.(UIElement.Visibility)" Value="Visible"/>
                    </VisualState.Setters>
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="800"/>
                    </VisualState.StateTriggers>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <TextBlock Text="{Binding BindingTitle}" Style="{StaticResource AppHeaderTextBlockStyle}"/>
        <ListView x:Name="listView" Grid.Row="1" 
                  ItemsSource="{Binding NewsItems}" ItemTemplate="{StaticResource DataTemplate_Binding}" />
        <TextBlock Grid.Row="2" Text="x:Bind" Style="{StaticResource AppHeaderTextBlockStyle}"/>
        <ListView Grid.Row="3" 
                  ItemsSource="{Binding NewsItems}" ItemTemplate="{StaticResource DataTemplate_XBind}" />
        <Button x:Name="button" Grid.RowSpan="4" Content="override image" VerticalAlignment="Center" Grid.Column="1" Visibility="Collapsed"
                Click="button_Click"/>
        <Image x:Name="_lazyImage" Width="200" Grid.Column="2" Visibility="Collapsed"
               Grid.RowSpan="4" VerticalAlignment="Center"
               x:DeferLoadStrategy="Lazy" Source="{Binding SelectedItem.ImageUri, ElementName=listView}"/>
    </Grid>
</local:PageBase><commit_msg>xaml cleanup<commit_after>﻿<local:PageBase
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:UwpDeepDive.MainApp.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModels="using:UwpDeepDive.MainApp.ViewModels"
    x:Class="UwpDeepDive.MainApp.Views.XamlPage"
    mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:XamlPageVm, d:IsDesignTimeCreatable=True}">
    <local:PageBase.Resources>
        
        <DataTemplate x:Key="DataTemplate_Binding">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock 
                    Text="{Binding Title}" 
                    Grid.Column="1"/>
                <TextBlock 
                    Text="{Binding Date}" 
                    Grid.Row="1" Grid.Column="1"/>
                <Image 
                    Source="{Binding ImageUri}" 
                    Grid.RowSpan="2" Grid.Row="0" Grid.Column="0" 
                    Height="60" Width="60" Margin="0,0,10,0"/>
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="DataTemplate_XBind" x:DataType="viewModels:NewsItemVmi">
            <RelativePanel>
                <TextBlock 
                    Text="{x:Bind Title}"
                    x:Name="title"  
                    RelativePanel.RightOf="{Binding ElementName=image}" />
                <TextBlock 
                    Text="{x:Bind Date}"
                    x:Name="date"  
                    RelativePanel.RightOf="{Binding ElementName=image}" 
                    RelativePanel.Below="{Binding ElementName=title}"
                    x:Phase="1"/>
                <Image 
                    Source="{x:Bind ImageUri}"
                    x:Name="image" 
                    Height="60" Width="60" Margin="0,0,8,0"
                    x:Phase="2"/>
            </RelativePanel>
        </DataTemplate>
    </local:PageBase.Resources>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="VisualStates">
                <VisualState x:Name="Narrow"/>
                <VisualState x:Name="MediumWide">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="600"/>
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="_button.(UIElement.Visibility)" Value="Visible"/>
                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="FullWide">
                    <VisualState.Setters>
                        <Setter Target="_button.(UIElement.Visibility)" Value="Visible"/>
                        <Setter Target="_lazyImage.(UIElement.Visibility)" Value="Visible"/>
                    </VisualState.Setters>
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="800"/>
                    </VisualState.StateTriggers>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        
        <TextBlock 
            Text="{Binding BindingTitle}" Style="{StaticResource AppHeaderTextBlockStyle}"/>
        <TextBlock 
            Grid.Row="2" Grid.Column="0"
            Text="x:Bind" Style="{StaticResource AppHeaderTextBlockStyle}"/>

        <ListView 
            x:Name="_listViewBinding" 
            Grid.Row="1" Grid.Column="0"
            ItemsSource="{Binding NewsItems}" 
            ItemTemplate="{StaticResource DataTemplate_Binding}" />
                
        <ListView x:Name="_listViewXBind" 
            Grid.Row="3" Grid.Column="0"
            ItemsSource="{Binding NewsItems}" 
            ItemTemplate="{StaticResource DataTemplate_XBind}" />

        <Button 
            x:Name="_button"
            Grid.RowSpan="4" Content="override image" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0" 
            Visibility="Collapsed"
            Click="button_Click"/>

        <Image 
            x:DeferLoadStrategy="Lazy" 
            x:Name="_lazyImage" Width="200" Grid.Column="2" Visibility="Collapsed" Grid.Row="0"
            Grid.RowSpan="4" VerticalAlignment="Center"
            Source="{Binding SelectedItem.ImageUri, ElementName=_listViewBinding}"/>
    </Grid>
</local:PageBase>
{'fraction_non_alphanumeric': 0.1262543518328896, 'fraction_numerical': 0.01198033995494573, 'mean_word_length': 1.9374436090225564, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 0, '>': 137, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, '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': '6537365', 'n_tokens_mistral': 2720, 'n_tokens_neox': 2441, 'n_words': 345}