<commit_before>﻿<UserControl
    x:Class="KmlViewer.TableOfContents"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:KmlViewer"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:mapping="using:Esri.ArcGISRuntime.Mapping"
    xmlns:ogc="using:Esri.ArcGISRuntime.Ogc"

    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">
    <UserControl.Resources>
        <Style TargetType="CheckBox">
            <Setter Property="MinWidth" Value="0" />
        </Style>
        <local:TocIconConverter x:Key="iconConverter" />
        <local:InProgressConverter x:Key="progressConverter" />
        <local:TocTemplateSelector x:Key="KmlSelector">
            <local:TocTemplateSelector.KmlLayerTemplate>
                <DataTemplate x:DataType="mapping:KmlLayer">
                    <TreeViewItem ItemsSource="{x:Bind Dataset.RootNodes, Mode=OneWay}" Content="{Binding Mode=OneWay}">
                        <TreeViewItem.ContentTemplate>
                            <DataTemplate x:DataType="mapping:KmlLayer">
                                <StackPanel Orientation="Horizontal" ToolTipService.ToolTip="{x:Bind Dataset.Source.OriginalString}">
                                    <CheckBox IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                                    <Image Source="{Binding Converter={StaticResource iconConverter}}" />
                                    <TextBlock Text="{Binding Name}" VerticalAlignment="Center" />
                                </StackPanel>
                            </DataTemplate>
                        </TreeViewItem.ContentTemplate>
                    </TreeViewItem>
                </DataTemplate>
            </local:TocTemplateSelector.KmlLayerTemplate>

            <local:TocTemplateSelector.LayerTemplate><commit_msg>Expand kml layer at startup<commit_after>﻿<UserControl
    x:Class="KmlViewer.TableOfContents"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:KmlViewer"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:mapping="using:Esri.ArcGISRuntime.Mapping"
    xmlns:ogc="using:Esri.ArcGISRuntime.Ogc"

    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">
    <UserControl.Resources>
        <Style TargetType="CheckBox">
            <Setter Property="MinWidth" Value="0" />
        </Style>
        <local:TocIconConverter x:Key="iconConverter" />
        <local:InProgressConverter x:Key="progressConverter" />
        <local:TocTemplateSelector x:Key="KmlSelector">
            <local:TocTemplateSelector.KmlLayerTemplate>
                <DataTemplate x:DataType="mapping:KmlLayer">
                    <TreeViewItem IsExpanded="True" ItemsSource="{x:Bind Dataset.RootNodes, Mode=OneWay}" Content="{Binding Mode=OneWay}">
                        <TreeViewItem.ContentTemplate>
                            <DataTemplate x:DataType="mapping:KmlLayer">
                                <StackPanel Orientation="Horizontal" ToolTipService.ToolTip="{x:Bind Dataset.Source.OriginalString}">
                                    <CheckBox IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                                    <Image Source="{Binding Converter={StaticResource iconConverter}}" />
                                    <TextBlock Text="{Binding Name}" VerticalAlignment="Center" />
                                </StackPanel>
                            </DataTemplate>
                        </TreeViewItem.ContentTemplate>
                    </TreeViewItem>
                </DataTemplate>
            </local:TocTemplateSelector.KmlLayerTemplate>

            <local:TocTemplateSelector.LayerTemplate>
{'fraction_non_alphanumeric': 0.1212045793927327, 'fraction_numerical': 0.011448481831757094, 'mean_word_length': 2.288870703764321, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4659870', 'n_tokens_mistral': 1166, 'n_tokens_neox': 1066, 'n_words': 124}