在 `MovingInfo.cs` 中: * 添加了类注释 `/// <summary>动态信息</summary>`。 * 将 `Data` 类重命名为 `MovingInfo`,并添加了属性 `Code`、`Message` 和 `Data`。 * 将 `Data` 类中的 `name` 字段重命名为 `Id`,并添加了多个属性:`Account`、`Content`、`Visible`、`Time`、`Location`、`UserName`、`HeadIcon`、`Email`、`Permission`、`LoginTime`、`Gender` 和 `Enable`。 在 `ItemView.xaml` 中: * 添加了 `xmlns:DataType="datalist:MovingInfo"` 命名空间。 * 修改了 `Ellipse.Fill` 的 `ImageBrush`,将 `ImageSource` 从固定路径改为绑定 `HeadIcon`。 * 修改了 `TextBlock` 的 `Text` 属性,绑定 `UserName` 和 `Time`。 * 修改了 `TextBlock` 的 `Text` 属性,绑定 `Content`。 在 `ConcernPage.xaml.cs` 中: * 将 `ObservableCollection<CommunityList.Data>` 和 `ObservableCollection<MovingInfo.Data>` 分别修改为 `ObservableCollection<CommunityList.Data>` 和 `ObservableCollection<MovingInfo.DynamicRecord>`。 * 修改了 `dongtaixiaoxi` 方法,添加了 `account` 和 `ALL` 参数,并根据 `ALL` 参数调用不同的 API 获取数据。 * 在 `ListViewA_SelectionChanged` 方法中,修改了调用 `dongtaixiaoxi` 方法时传递的参数。 在 `Dynamic.cs` 中: * 新增了 `Dynamic` 类,并添加了两个静态方法 `GetAllDynamic` 和 `Getlist`,用于异步获取动态信息。
65 lines
2.5 KiB
XML
65 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:DataType="datalist:MovingInfo">
|
|
<DataTemplate x:Key="MovingInfo">
|
|
<StackPanel
|
|
Margin="0,0,0,16"
|
|
Padding="16"
|
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="{StaticResource ControlCornerRadius}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Ellipse
|
|
Grid.Column="0"
|
|
Width="56"
|
|
Height="56">
|
|
<Ellipse.Fill>
|
|
<ImageBrush ImageSource="{Binding HeadIcon}" Stretch="UniformToFill" />
|
|
</Ellipse.Fill>
|
|
</Ellipse>
|
|
<StackPanel Grid.Column="1" Margin="9,0,0,0">
|
|
|
|
<!-- 名称 -->
|
|
<TextBlock Style="{StaticResource SubtitleTextBlockStyle}" Text="{Binding UserName}" />
|
|
<!-- 信息 日期 -->
|
|
<TextBlock
|
|
Margin="0,3,0,0"
|
|
Style="{StaticResource BodyTextBlockStyle}"
|
|
Text="{Binding Time}" />
|
|
</StackPanel>
|
|
<FontIcon
|
|
Grid.Column="2"
|
|
VerticalAlignment="Top"
|
|
Glyph="" />
|
|
</Grid>
|
|
<!-- 内容是大概就是这个东西了 -->
|
|
<TextBlock
|
|
Margin="16"
|
|
Style="{StaticResource BodyTextBlockStyle}"
|
|
Text="{Binding Content}" />
|
|
<StackPanel
|
|
Margin="16,0,0,0"
|
|
HorizontalAlignment="Right"
|
|
FlowDirection="RightToLeft"
|
|
Orientation="Horizontal">
|
|
<StackPanel.Resources>
|
|
<Style TargetType="FontIcon">
|
|
<Setter Property="Margin" Value="0,0,26,0" />
|
|
</Style>
|
|
</StackPanel.Resources>
|
|
<FontIcon Glyph="" />
|
|
<FontIcon Glyph="" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
|
|
</ResourceDictionary>
|