Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Commit

Permalink
可以显示子回复了
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiichiamane committed Sep 28, 2019
1 parent 58e2a26 commit 4ff6627
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions PixivFSUWP/Data/CommentsCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ protected async Task<LoadMoreItemsResult> LoadMoreItemsAsync(CancellationToken c
in ChildrenComments
where item.ParentID == recommendmodel.ID
select item;
children = children.ToList();
if (children.Count() > 0)
{
//存在子回复
Expand Down
30 changes: 30 additions & 0 deletions PixivFSUWP/IllustDetailPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
xmlns:local="using:PixivFSUWP"
xmlns:controls="using:PixivFSUWP.Controls"
xmlns:viewmodels="using:PixivFSUWP.ViewModels"
xmlns:converters="using:PixivFSUWP.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" SizeChanged="Page_SizeChanged"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
<converters:ChildrenCommentVisibilityConverter x:Name="ChildrenCommentVisibilityConverter"/>
</Page.Resources>
<ScrollViewer Background="{StaticResource PageBackGround}" VerticalScrollBarVisibility="Hidden" ViewChanged="ScrollViewer_ViewChanged">
<StackPanel Margin="0,75,0,0">
<StackPanel Orientation="Horizontal" Margin="15,15,15,0">
Expand Down Expand Up @@ -138,13 +142,39 @@
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding UserName}" FontWeight="Bold"/>
<TextBlock Text="{Binding UserAccount}" Foreground="Gray"/>
</StackPanel>
<TextBlock Grid.Row="1" Text="{Binding Comment}" TextWrapping="WrapWholeWords"/>
<TextBlock Grid.Row="2" Margin="0,3,0,0" Text="{Binding DateTime}" FontSize="12" Foreground="Gray"/>
<ListView Grid.Row="3" Visibility="{Binding ChildrenComments,Converter={StaticResource ChildrenCommentVisibilityConverter}}" ItemsSource="{Binding ChildrenComments}">
<ListView.ItemTemplate>
<DataTemplate x:DataType="viewmodels:CommentViewModel">
<Border Background="#99F3F3F3" Margin="0,5" BorderThickness="1.5">
<Border.BorderBrush>
<RevealBorderBrush Color="Transparent" FallbackColor="LightGray"/>
</Border.BorderBrush>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding UserName}" FontWeight="Bold"/>
<TextBlock Text="{Binding UserAccount}" Foreground="Gray"/>
</StackPanel>
<TextBlock Grid.Row="1" Text="{Binding Comment}" TextWrapping="WrapWholeWords"/>
<TextBlock Grid.Row="2" Margin="0,3,0,0" Text="{Binding DateTime}" FontSize="12" Foreground="Gray"/>
</Grid>
</Border>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Border>
</DataTemplate>
Expand Down

0 comments on commit 4ff6627

Please sign in to comment.