<commit_before>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Microsoft.Sarif.Viewer.Themes"
                    xmlns:converters="clr-namespace:Microsoft.Sarif.Viewer.Converters">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/Microsoft.Sarif.Viewer;component/Themes/DefaultStyles.xaml" />
    </ResourceDictionary.MergedDictionaries>
    
    <!-- Converters -->
    <converters:StringToVisibilityConverter x:Key="stringToVisibilityConverter" />

    <DataTemplate x:Key="StackCollectionTemplate">
        <ItemsControl ItemsSource="{Binding}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <DockPanel IsItemsHost="True"
                               LastChildFill="False" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemContainerStyle>
                <Style TargetType="{x:Type ContentPresenter}">
                    <Setter Property="DockPanel.Dock"
                            Value="Top" />
                </Style>
            </ItemsControl.ItemContainerStyle>
            <ItemsControl.ItemTemplate>
                <DataTemplate>

                    <DockPanel>
                        <Separator DockPanel.Dock="Top"
                                   Margin="0 15 0 3"
                                   Background="LightGray" />
                        <TreeView DockPanel.Dock="Top"
                                  BorderThickness="0">
                            <TreeViewItem IsExpanded="True">
                                <TreeViewItem.Header>
                                    <TextBlock Style="{StaticResource PanelHeader}"
                                               Text="{Binding Message}" />
                                </TreeViewItem.Header>
                                <TreeViewItem>
                                    <TreeViewItem.Header>
                                        <ListView Margin="2"
                                                  ItemsSource="{Binding}"
                                                  BorderBrush="LightGray"
                                                  Height="Auto"
                                                  HorizontalAlignment="Stretch"
                                                  ScrollViewer.CanContentScroll="False"
                                                  ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                                  ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                                  SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
                                            <ListView.View>
                                                <GridView>
                                                    <GridViewColumn DisplayMemberBinding="{Binding Message}"
                                                                    Header="Message"
                                                                    Width="Auto" />
                                                    <GridViewColumn Header="Location">
                                                        <GridViewColumn.CellTemplate>
                                                            <DataTemplate>
                                                                <TextBlock>
                                                                    <InlineUIContainer>
                                                                        <TextBlock Visibility="{Binding Module, Converter={StaticResource stringToVisibilityConverter}}">
                                                                            <Run Text="{Binding Module}" /><Run Text="!" />
                                                                        </TextBlock>
                                                                    </InlineUIContainer><InlineUIContainer>
                                                                        <TextBlock Visibility="{Binding FullyQualifiedLogicalName, Converter={StaticResource stringToVisibilityConverter}}">
                                                                            <Run Text="{Binding FullyQualifiedLogicalName}" /><Run Text="!" />
                                                                        </TextBlock>
                                                                    </InlineUIContainer>
                                                                    <Run Text="{Binding FileName, Mode=OneWay}" /> Line <Run Text="{Binding Region.StartLine, Mode=OneWay}" /><InlineUIContainer>
                                                                        <TextBlock Visibility="{Binding Column, Converter={StaticResource stringToVisibilityConverter}}">
                                                                            <Run Text="Col " /><Run Text="{Binding Column}" />
                                                                        </TextBlock>
                                                                    </InlineUIContainer>
                                                                </TextBlock>    
                                                            </DataTemplate>
                                                        </GridViewColumn.CellTemplate>
                                                    </GridViewColumn>
                                                </GridView>
                                            </ListView.View>
                                        </ListView>
                                    </TreeViewItem.Header>
                                </TreeViewItem>
                            </TreeViewItem>
                        </TreeView>
                    </DockPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </DataTemplate>

</ResourceDictionary><commit_msg>Fix viewer#34: Stack frames don't show line numbers<commit_after>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Microsoft.Sarif.Viewer.Themes"
                    xmlns:converters="clr-namespace:Microsoft.Sarif.Viewer.Converters">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/Microsoft.Sarif.Viewer;component/Themes/DefaultStyles.xaml" />
    </ResourceDictionary.MergedDictionaries>
    
    <!-- Converters -->
    <converters:StringToVisibilityConverter x:Key="stringToVisibilityConverter" />
    <converters:Int32ToVisibilityConverter x:Key="int32ToVisibilityConverter" />

    <DataTemplate x:Key="StackCollectionTemplate">
        <ItemsControl ItemsSource="{Binding}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <DockPanel IsItemsHost="True"
                               LastChildFill="False" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemContainerStyle>
                <Style TargetType="{x:Type ContentPresenter}">
                    <Setter Property="DockPanel.Dock"
                            Value="Top" />
                </Style>
            </ItemsControl.ItemContainerStyle>
            <ItemsControl.ItemTemplate>
                <DataTemplate>

                    <DockPanel>
                        <Separator DockPanel.Dock="Top"
                                   Margin="0 15 0 3"
                                   Background="LightGray" />
                        <TreeView DockPanel.Dock="Top"
                                  BorderThickness="0">
                            <TreeViewItem IsExpanded="True">
                                <TreeViewItem.Header>
                                    <TextBlock Style="{StaticResource PanelHeader}"
                                               Text="{Binding Message}" />
                                </TreeViewItem.Header>
                                <TreeViewItem>
                                    <TreeViewItem.Header>
                                        <ListView Margin="2"
                                                  ItemsSource="{Binding}"
                                                  BorderBrush="LightGray"
                                                  Height="Auto"
                                                  HorizontalAlignment="Stretch"
                                                  ScrollViewer.CanContentScroll="False"
                                                  ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                                  ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                                  SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
                                            <ListView.View>
                                                <GridView>
                                                    <GridViewColumn DisplayMemberBinding="{Binding Message}"
                                                                    Header="Message"
                                                                    Width="Auto" />
                                                    <GridViewColumn Header="Location">
                                                        <GridViewColumn.CellTemplate>
                                                            <DataTemplate>
                                                                <TextBlock>
                                                                    <InlineUIContainer>
                                                                        <TextBlock Visibility="{Binding Module, Converter={StaticResource stringToVisibilityConverter}}">
                                                                            <Run Text="{Binding Module}" /><Run Text="!" />
                                                                        </TextBlock>
                                                                    </InlineUIContainer>
                                                                    <InlineUIContainer>
                                                                        <TextBlock Visibility="{Binding FullyQualifiedLogicalName, Converter={StaticResource stringToVisibilityConverter}}">
                                                                            <Run Text="{Binding FullyQualifiedLogicalName}" /><Run Text="!" />
                                                                        </TextBlock>
                                                                    </InlineUIContainer>
                                                                    <Run Text="{Binding FileName, Mode=OneWay}" />
                                                                    <InlineUIContainer>
                                                                        <TextBlock Visibility="{Binding Line,Converter={StaticResource int32ToVisibilityConverter}}">
                                                                            <Run Text="Line "/><Run Text="{Binding Line, Mode=OneWay}" />
                                                                        </TextBlock>
                                                                    </InlineUIContainer>
                                                                    <InlineUIContainer>
                                                                        <TextBlock Visibility="{Binding Column, Converter={StaticResource int32ToVisibilityConverter}}">
                                                                            <Run Text=", Col " /><Run Text="{Binding Column, Mode=OneWay}" />
                                                                        </TextBlock>
                                                                    </InlineUIContainer>
                                                                </TextBlock>    
                                                            </DataTemplate>
                                                        </GridViewColumn.CellTemplate>
                                                    </GridViewColumn>
                                                </GridView>
                                            </ListView.View>
                                        </ListView>
                                    </TreeViewItem.Header>
                                </TreeViewItem>
                            </TreeViewItem>
                        </TreeView>
                    </DockPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </DataTemplate>

</ResourceDictionary>
{'fraction_non_alphanumeric': 0.07231295100645652, 'fraction_numerical': 0.0030383592859855677, 'mean_word_length': 0.7419952368351416, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 157, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 203, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3131347', 'n_tokens_mistral': 2147, 'n_tokens_neox': 1971, 'n_words': 307}