<UserControl
    x:Class="Pixeval.Controls.CommentView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:Pixeval.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Loaded="CommentView_OnLoaded"
    mc:Ignorable="d">
    <local:EntryView HasNoItem="{x:Bind HasNoItem, Mode=OneWay}" IsLoadingMore="{x:Bind CommentsList.IsLoadingMore, Mode=OneWay}">
        <local:EntryView.Content>
            <local:AdvancedItemsView
                x:Name="CommentsList"
                IsItemInvokedEnabled="False"
                ItemsSource="{x:Bind ItemsSource, Mode=OneWay}"
                LayoutType="VerticalStack"
                SelectionMode="None">
                <local:AdvancedItemsView.ItemTemplate>
                    <DataTemplate x:Key="CommentDataTemplate" x:DataType="local:CommentItemViewModel">
                        <ItemContainer>
                            <local:CommentItem
                                Margin="{StaticResource CardControlPadding}"
                                DeleteButtonClick="CommentItem_OnDeleteButtonClick"
                                OpenRepliesButtonClick="CommentItem_OnOpenRepliesButtonClick"
                                RequireEntryType="CommentItem_OnRequireEntryType"
                                ViewModel="{x:Bind}" />
                        </ItemContainer>
                    </DataTemplate>
                </local:AdvancedItemsView.ItemTemplate>
                <local:AdvancedItemsView.ItemTransitionProvider>
                    <LinedFlowLayoutItemCollectionTransitionProvider />
                </local:AdvancedItemsView.ItemTransitionProvider>
            </local:AdvancedItemsView>
        </local:EntryView.Content>
    </local:EntryView>
</UserControl>
