|
22 | 22 |
|
23 | 23 | <local:CardPanel |
24 | 24 | AutomationProperties.Name="{x:Bind ViewModel.Title, Mode=OneWay}" |
25 | | - CornerRadius="{ThemeResource OverlayCornerRadius}" |
26 | 25 | BorderBrush="{ThemeResource ControlElevationBorderBrush}" |
27 | | - Click="OnContainerClick"> |
| 26 | + Click="OnContainerClickAsync" |
| 27 | + CornerRadius="{ThemeResource OverlayCornerRadius}"> |
28 | 28 |
|
29 | 29 | <VisualStateManager.VisualStateGroups> |
30 | 30 | <VisualStateGroup x:Name="LayoutGroup"> |
|
49 | 49 | <Setter Target="ContentRow2.Height" Value="Auto" /> |
50 | 50 | <Setter Target="InlineUserContainer.(Grid.Row)" Value="1" /> |
51 | 51 | <Setter Target="TitleBlock.(Grid.Row)" Value="0" /> |
| 52 | + <Setter Target="AdditionalOverlayContainer.Margin" Value="8,8,0,0" /> |
| 53 | + <Setter Target="AdditionalOverlayContainer.VerticalAlignment" Value="Top" /> |
| 54 | + <Setter Target="AdditionalOverlayContainer.HorizontalAlignment" Value="Left" /> |
52 | 55 | </VisualState.Setters> |
53 | 56 | </VisualState> |
54 | 57 | </VisualStateGroup> |
|
66 | 69 | <Grid |
67 | 70 | x:Name="CoverContainer" |
68 | 71 | Height="124" |
69 | | - CornerRadius="4,4,0,0" |
70 | | - VerticalAlignment="Stretch"> |
| 72 | + VerticalAlignment="Stretch" |
| 73 | + CornerRadius="4,4,0,0"> |
71 | 74 | <hn:ImageEx |
72 | 75 | x:Name="CoverImage" |
73 | 76 | LazyLoadingEnabled="True" |
|
108 | 111 | RequestedTheme="Dark"> |
109 | 112 | <TextBlock Style="{StaticResource CaptionTextBlockStyle}" Text="{x:Bind ViewModel.Duration, Mode=OneWay}" /> |
110 | 113 | </Grid> |
| 114 | + |
| 115 | + <Grid |
| 116 | + x:Name="AdditionalOverlayContainer" |
| 117 | + Margin="0,0,8,8" |
| 118 | + HorizontalAlignment="Right" |
| 119 | + VerticalAlignment="Bottom" |
| 120 | + Visibility="{x:Bind AdditionalOverlayContentVisibility, Mode=OneWay}"> |
| 121 | + <ContentPresenter Content="{x:Bind AdditionalOverlayContent, Mode=OneWay}" /> |
| 122 | + </Grid> |
111 | 123 | </Grid> |
112 | 124 |
|
113 | 125 | <Grid |
114 | 126 | x:Name="SingleAvatar" |
115 | 127 | Margin="0,0,12,-18" |
116 | 128 | HorizontalAlignment="Right" |
117 | 129 | VerticalAlignment="Bottom" |
118 | | - Visibility="{x:Bind IsShowAvatar,Mode=OneWay}"> |
| 130 | + Visibility="{x:Bind IsShowAvatar, Mode=OneWay}"> |
119 | 131 | <Ellipse |
120 | 132 | Width="40" |
121 | 133 | Height="40" |
|
132 | 144 | <Grid |
133 | 145 | x:Name="ContentContainer" |
134 | 146 | Grid.Row="1" |
135 | | - Padding="12,8" |
| 147 | + Padding="12,8,12,0" |
136 | 148 | RowSpacing="8"> |
137 | 149 | <Grid.RowDefinitions> |
138 | 150 | <RowDefinition x:Name="ContentRow1" Height="Auto" /> |
139 | 151 | <RowDefinition x:Name="ContentRow2" Height="*" /> |
140 | 152 | <RowDefinition Height="Auto" /> |
| 153 | + <RowDefinition Height="Auto" /> |
141 | 154 | </Grid.RowDefinitions> |
142 | 155 | <StackPanel x:Name="InlineUserContainer" Orientation="Horizontal"> |
143 | | - <Grid Visibility="{x:Bind IsShowAvatar,Mode=OneWay}"> |
| 156 | + <Grid Visibility="{x:Bind IsShowAvatar, Mode=OneWay}"> |
144 | 157 | <local:UserAvatar |
145 | | - x:Name="InlineAvatar" |
146 | | - Width="24" |
147 | | - Height="24" |
148 | | - Margin="0,0,8,0" |
149 | | - VerticalAlignment="Center" |
150 | | - Avatar="{x:Bind ViewModel.PublisherAvatar, Mode=OneWay}" |
151 | | - UserName="{x:Bind ViewModel.PublisherName, Mode=OneWay}" |
152 | | - Visibility="Collapsed" /> |
| 158 | + x:Name="InlineAvatar" |
| 159 | + Width="24" |
| 160 | + Height="24" |
| 161 | + Margin="0,0,8,0" |
| 162 | + VerticalAlignment="Center" |
| 163 | + Avatar="{x:Bind ViewModel.PublisherAvatar, Mode=OneWay}" |
| 164 | + UserName="{x:Bind ViewModel.PublisherName, Mode=OneWay}" |
| 165 | + Visibility="Collapsed" /> |
153 | 166 | </Grid> |
154 | 167 |
|
155 | 168 | <TextBlock |
|
171 | 184 | <ToolTip Content="{x:Bind ViewModel.Title, Mode=OneWay}" IsEnabled="{x:Bind TitleBlock.IsTextTrimmed, Mode=OneWay}" /> |
172 | 185 | </ToolTipService.ToolTip> |
173 | 186 | </TextBlock> |
| 187 | + |
174 | 188 | <StackPanel |
175 | 189 | Grid.Row="2" |
176 | 190 | Orientation="Horizontal" |
|
196 | 210 | Text="{x:Bind ViewModel.ReplyCount, Mode=OneWay}" |
197 | 211 | Visibility="{x:Bind IsShowReplayCount, Mode=OneWay}" /> |
198 | 212 | </StackPanel> |
| 213 | + <Grid Grid.Row="3" Visibility="{x:Bind AdditionalFooterContent, Mode=OneWay, Converter={StaticResource ObjectToVisibilityConverter}}"> |
| 214 | + <ContentPresenter x:Name="AdditionalFooterPresenter" Content="{x:Bind AdditionalFooterContent, Mode=OneWay}" /> |
| 215 | + </Grid> |
199 | 216 | </Grid> |
200 | 217 | </Grid> |
201 | 218 | </local:CardPanel> |
|
0 commit comments