<commit_before>﻿<Page
    x:Class="FlashbackUwp.Views.MyStartedThreadsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:FlashbackUwp.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModels="using:FlashbackUwp.ViewModels"
    xmlns:converters="using:FlashbackUwp.Converters"
    xmlns:controls="using:Template10.Controls"
    xmlns:triggers="using:FlashbackUwp.Triggers"
    mc:Ignorable="d">

    <Page.DataContext>
        <viewModels:MyStartedThreadsViewModel x:Name="ViewModel" />
    </Page.DataContext>

    <Page.Resources>
        <converters:BoolToVisibilityConverter x:Key="BoolConverter" />
        <converters:UnreadMessageBrushconverter x:Key="UnreadMessageBrushconverter"/>
    </Page.Resources>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <!-- Header Row -->
            <RowDefinition Height="*" />
            <!-- Content Row -->
            <RowDefinition Height="Auto" />
            <!-- CommandBar Row -->
        </Grid.RowDefinitions>

        <VisualStateManager.VisualStateGroups>

            <VisualStateGroup x:Name="DeviceStates">
                <VisualState x:Name="Mobile">
                    <VisualState.StateTriggers>
                        <triggers:DeviceStateTrigger DeviceFamily="Windows.Mobile"/>
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="OpenHamburgerMenuButton.Visibility" Value="Visible"/>
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="AdaptiveVisualStateGroup">
                <VisualState x:Name="VisualStateNarrow">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="{StaticResource NarrowMinWidth}" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <!--  TODO: change properties for narrow view  -->
                        <Setter Target="BottonCommands.Visibility" Value="Visible"/>
                        <Setter Target="pageHeader.PrimaryCommandsVisibility" Value="Collapsed"/>
                        <Setter Target="RefreshButton.Visibility" Value="Collapsed"/>
                        <Setter Target="pageHeader.EllipsisVisibility" Value="Collapsed"/>

                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="VisualStateNormal">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="{StaticResource NormalMinWidth}" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <!--  TODO: change properties for normal view  -->
                        <Setter Target="BottonCommands.Visibility" Value="Visible"/>
                        <Setter Target="pageHeader.PrimaryCommandsVisibility" Value="Collapsed"/>
                        <Setter Target="RefreshButton.Visibility" Value="Collapsed"/>
                        <Setter Target="pageHeader.EllipsisVisibility" Value="Collapsed"/>

                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="VisualStateWide">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWidth}" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <!--  TODO: change properties for wide view  -->
                        <Setter Target="pageHeader.Visibility" Value="Visible"/>
                        <Setter Target="pageHeader.PrimaryCommandsVisibility" Value="Visible"/>
                        <Setter Target="RefreshButton.Visibility" Value="Visible"/>
                        <Setter Target="pageHeader.EllipsisVisibility" Value="Visible"/>

                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <!--  header  -->
        <controls:PageHeader x:Name="pageHeader" Frame="{x:Bind Frame}" Grid.Row="0"
                             RelativePanel.AlignLeftWithPanel="True"
                             RelativePanel.AlignRightWithPanel="True"
                             RelativePanel.AlignTopWithPanel="True"                              
                             EllipsisVisibility="Collapsed" 
                             PrimaryCommandsVisibility="Collapsed"
                             Text="Mina startade trådar">
            <controls:PageHeader.PrimaryCommands>
                <AppBarButton Click="{x:Bind ViewModel.Refresh}" Label="Ladda om" Icon="Refresh" x:Name="RefreshButton" Visibility="Collapsed"/>
            </controls:PageHeader.PrimaryCommands>
            <!--<interactivity:Interaction.Behaviors>
                <behaviors:EllipsisBehavior Visibility="Auto" x:Name="EllipsisBehavior" />
            </interactivity:Interaction.Behaviors>-->
        </controls:PageHeader>

        <!--  content  -->
        <ListView ItemsSource="{Binding Path=Threads}" ItemClick="{x:Bind ViewModel.NavigateToThread}" IsItemClickEnabled="True" Padding="12,8,0,0" Grid.Row="1">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" Margin="-12,0,0,5">
                        <StackPanel Orientation="Vertical">
                            <TextBlock HorizontalAlignment="Left" FontFamily="Segoe MDL2 Assets" Margin="5,2,0,0"  Text="{Binding XamlCode}" Visibility="{Binding ShowForumColor, Converter={StaticResource BoolConverter}, ConverterParameter=true}"></TextBlock>
                            <TextBlock HorizontalAlignment="Center" Margin="3,0,0,0" FontSize="10" Foreground="{ThemeResource SystemControlForegroundBaseMediumLowBrush}" Visibility="{Binding ShowPostCount}" Text="{Binding PostCount}"></TextBlock>
                        </StackPanel>
                        <StackPanel Margin="12,0,0,0">
                            <TextBlock Width="1000" Text="{Binding Path=Name}" Margin="0" FontWeight="Normal" TextWrapping="Wrap" VerticalAlignment="Center" Style="{ThemeResource BodyTextBlockStyle}"/>
                            <TextBlock Text="{Binding Path=Description}" Margin="0,-1,0,0" FontWeight="Normal" Foreground="{ThemeResource SystemControlForegroundBaseMediumLowBrush}" TextWrapping="Wrap" VerticalAlignment="Center" Style="{StaticResource BodyTextBlockStyle}"/>
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

        <Grid x:Name="BottomBar" Grid.Row="2">
            <CommandBar ClosedDisplayMode="Compact" x:Name="BottonCommands" Visibility="Collapsed">
                <CommandBar.Content>
                    <AppBarButton Click="{x:Bind ViewModel.OpenMenu}" Visibility="Collapsed" x:Name="OpenHamburgerMenuButton" Background="{ThemeResource SystemControlPageBackgroundChromeLowBrush}">
                        <FontIcon Glyph="&#xE700;"></FontIcon>
                    </AppBarButton>
                </CommandBar.Content>
                <AppBarButton Name="BottonPrimaryHome" Icon="Refresh" Label="Ladda om" Click="{x:Bind ViewModel.Refresh}" />
            </CommandBar>
        </Grid>
    </Grid>
</Page><commit_msg>onödig grid (#41)<commit_after>﻿<Page
    x:Class="FlashbackUwp.Views.MyStartedThreadsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:FlashbackUwp.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModels="using:FlashbackUwp.ViewModels"
    xmlns:converters="using:FlashbackUwp.Converters"
    xmlns:controls="using:Template10.Controls"
    xmlns:triggers="using:FlashbackUwp.Triggers"
    mc:Ignorable="d">

    <Page.DataContext>
        <viewModels:MyStartedThreadsViewModel x:Name="ViewModel" />
    </Page.DataContext>

    <Page.Resources>
        <converters:BoolToVisibilityConverter x:Key="BoolConverter" />
        <converters:UnreadMessageBrushconverter x:Key="UnreadMessageBrushconverter"/>
    </Page.Resources>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <!-- Header Row -->
            <RowDefinition Height="*" />
            <!-- Content Row -->
            <RowDefinition Height="Auto" />
            <!-- CommandBar Row -->
        </Grid.RowDefinitions>

        <VisualStateManager.VisualStateGroups>

            <VisualStateGroup x:Name="DeviceStates">
                <VisualState x:Name="Mobile">
                    <VisualState.StateTriggers>
                        <triggers:DeviceStateTrigger DeviceFamily="Windows.Mobile"/>
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="OpenHamburgerMenuButton.Visibility" Value="Visible"/>
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="AdaptiveVisualStateGroup">
                <VisualState x:Name="VisualStateNarrow">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="{StaticResource NarrowMinWidth}" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <!--  TODO: change properties for narrow view  -->
                        <Setter Target="BottonCommands.Visibility" Value="Visible"/>
                        <Setter Target="pageHeader.PrimaryCommandsVisibility" Value="Collapsed"/>
                        <Setter Target="RefreshButton.Visibility" Value="Collapsed"/>
                        <Setter Target="pageHeader.EllipsisVisibility" Value="Collapsed"/>

                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="VisualStateNormal">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="{StaticResource NormalMinWidth}" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <!--  TODO: change properties for normal view  -->
                        <Setter Target="BottonCommands.Visibility" Value="Visible"/>
                        <Setter Target="pageHeader.PrimaryCommandsVisibility" Value="Collapsed"/>
                        <Setter Target="RefreshButton.Visibility" Value="Collapsed"/>
                        <Setter Target="pageHeader.EllipsisVisibility" Value="Collapsed"/>

                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="VisualStateWide">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWidth}" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <!--  TODO: change properties for wide view  -->
                        <Setter Target="pageHeader.Visibility" Value="Visible"/>
                        <Setter Target="pageHeader.PrimaryCommandsVisibility" Value="Visible"/>
                        <Setter Target="RefreshButton.Visibility" Value="Visible"/>
                        <Setter Target="pageHeader.EllipsisVisibility" Value="Visible"/>

                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <!--  header  -->
        <controls:PageHeader x:Name="pageHeader" Frame="{x:Bind Frame}" Grid.Row="0"
                             RelativePanel.AlignLeftWithPanel="True"
                             RelativePanel.AlignRightWithPanel="True"
                             RelativePanel.AlignTopWithPanel="True"                              
                             EllipsisVisibility="Collapsed" 
                             PrimaryCommandsVisibility="Collapsed"
                             Text="Mina startade trådar">
            <controls:PageHeader.PrimaryCommands>
                <AppBarButton Click="{x:Bind ViewModel.Refresh}" Label="Ladda om" Icon="Refresh" x:Name="RefreshButton" Visibility="Collapsed"/>
            </controls:PageHeader.PrimaryCommands>
            <!--<interactivity:Interaction.Behaviors>
                <behaviors:EllipsisBehavior Visibility="Auto" x:Name="EllipsisBehavior" />
            </interactivity:Interaction.Behaviors>-->
        </controls:PageHeader>

        <!--  content  -->
        <ListView ItemsSource="{Binding Path=Threads}" ItemClick="{x:Bind ViewModel.NavigateToThread}" IsItemClickEnabled="True" Padding="12,8,0,0" Grid.Row="1">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" Margin="-12,0,0,5">
                        <StackPanel Orientation="Vertical">
                            <TextBlock HorizontalAlignment="Left" FontFamily="Segoe MDL2 Assets" Margin="5,2,0,0"  Text="{Binding XamlCode}" Visibility="{Binding ShowForumColor, Converter={StaticResource BoolConverter}, ConverterParameter=true}"></TextBlock>
                            <TextBlock HorizontalAlignment="Center" Margin="3,0,0,0" FontSize="10" Foreground="{ThemeResource SystemControlForegroundBaseMediumLowBrush}" Visibility="{Binding ShowPostCount}" Text="{Binding PostCount}"></TextBlock>
                        </StackPanel>
                        <StackPanel Margin="12,0,0,0">
                            <TextBlock Width="1000" Text="{Binding Path=Name}" Margin="0" FontWeight="Normal" TextWrapping="Wrap" VerticalAlignment="Center" Style="{ThemeResource BodyTextBlockStyle}"/>
                            <TextBlock Text="{Binding Path=Description}" Margin="0,-1,0,0" FontWeight="Normal" Foreground="{ThemeResource SystemControlForegroundBaseMediumLowBrush}" TextWrapping="Wrap" VerticalAlignment="Center" Style="{StaticResource BodyTextBlockStyle}"/>
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

        <CommandBar ClosedDisplayMode="Compact" x:Name="BottonCommands" Visibility="Collapsed" Grid.Row="2">
            <CommandBar.Content>
                <AppBarButton Click="{x:Bind ViewModel.OpenMenu}" Visibility="Collapsed" x:Name="OpenHamburgerMenuButton" Background="{ThemeResource SystemControlPageBackgroundChromeLowBrush}">
                    <FontIcon Glyph="&#xE700;"></FontIcon>
                </AppBarButton>
            </CommandBar.Content>
            <AppBarButton Name="BottonPrimaryHome" Icon="Refresh" Label="Ladda om" Click="{x:Bind ViewModel.Refresh}" />
        </CommandBar>
    </Grid>
</Page>
{'fraction_non_alphanumeric': 0.11688479979266554, 'fraction_numerical': 0.007775042114811455, 'mean_word_length': 2.1506429883649725, 'pattern_counts': {'":': 0, '<': 219, '<?xml version=': 0, '>': 219, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 20}, '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': '2002656', 'n_tokens_mistral': 4015, 'n_tokens_neox': 3692, 'n_words': 540}