完成关注页面

croire 2 years ago
parent 4188daca72
commit 60813ce903

@ -8,7 +8,14 @@ namespace DownKyi.Core.BiliApi.Users.Models
public class RelationWhisper : BaseModel
{
[JsonProperty("data")]
public List<RelationFollowInfo> Data { get; set; }
public RelationWhisperData Data { get; set; }
}
public class RelationWhisperData : BaseModel
{
[JsonProperty("list")]
public List<RelationFollowInfo> List { get; set; }
// re_version
}
}

@ -139,8 +139,8 @@ namespace DownKyi.Core.BiliApi.Users
try
{
RelationWhisper relationWhisper = JsonConvert.DeserializeObject<RelationWhisper>(response);
if (relationWhisper == null || relationWhisper.Data == null) { return null; }
return relationWhisper.Data;
if (relationWhisper == null || relationWhisper.Data == null || relationWhisper.Data.List == null) { return null; }
return relationWhisper.Data.List;
}
catch (Exception e)
{

@ -60,8 +60,9 @@ namespace DownKyi.CustomControl
}
set
{
if (value < Current || value < 1)
if (value < Current || value < 0)
{
Visibility = Visibility.Hidden;
//throw new Exception("数值不在允许的范围内。");
System.Console.WriteLine(value.ToString());
}
@ -69,7 +70,7 @@ namespace DownKyi.CustomControl
{
count = value;
if (count == 1) { Visibility = Visibility.Hidden; }
if (count <= 1) { Visibility = Visibility.Hidden; }
else { Visibility = Visibility.Visible; }
OnCountChanged(count);

@ -129,6 +129,7 @@
<Compile Include="ViewModels\PageViewModels\Favorites.cs" />
<Compile Include="ViewModels\PageViewModels\FavoritesMedia.cs" />
<Compile Include="ViewModels\PageViewModels\ChannelMedia.cs" />
<Compile Include="ViewModels\PageViewModels\FriendInfo.cs" />
<Compile Include="ViewModels\PageViewModels\HistoryMedia.cs" />
<Compile Include="ViewModels\PageViewModels\PublicationMedia.cs" />
<Compile Include="ViewModels\PageViewModels\SpaceItem.cs" />

@ -102,6 +102,7 @@
<system:String x:Key="FriendFollowing">关注</system:String>
<system:String x:Key="FriendFollower">粉丝</system:String>
<system:String x:Key="FollowingWait">请稍等,马上就好~</system:String>
<system:String x:Key="AllFollowing">全部关注</system:String>
<system:String x:Key="WhisperFollowing">悄悄关注</system:String>

@ -10,7 +10,7 @@ namespace DownKyi.ViewModels
public class BaseViewModel : BindableBase, INavigationAware
{
protected readonly IEventAggregator eventAggregator;
protected readonly IDialogService dialogService;
protected IDialogService dialogService;
protected string ParentView = string.Empty;
public BaseViewModel(IEventAggregator eventAggregator)

@ -1,13 +1,20 @@
using DownKyi.Core.BiliApi.Users;
using DownKyi.Core.BiliApi.Users.Models;
using DownKyi.Core.Settings;
using DownKyi.Core.Settings.Models;
using DownKyi.Core.Storage;
using DownKyi.CustomControl;
using DownKyi.Utils;
using DownKyi.ViewModels.PageViewModels;
using Prism.Commands;
using Prism.Events;
using Prism.Regions;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;
namespace DownKyi.ViewModels.Friends
{
@ -18,8 +25,74 @@ namespace DownKyi.ViewModels.Friends
// mid
private long mid = -1;
// 每页数量,暂时在此写死,以后在设置中增加选项
private readonly int NumberInPage = 20;
#region 页面属性申明
private string pageName = ViewFriendsViewModel.Tag;
public string PageName
{
get => pageName;
set => SetProperty(ref pageName, value);
}
private Visibility contentVisibility;
public Visibility ContentVisibility
{
get => contentVisibility;
set => SetProperty(ref contentVisibility, value);
}
private Visibility innerContentVisibility;
public Visibility InnerContentVisibility
{
get => innerContentVisibility;
set => SetProperty(ref innerContentVisibility, value);
}
private GifImage loading;
public GifImage Loading
{
get => loading;
set => SetProperty(ref loading, value);
}
private Visibility loadingVisibility;
public Visibility LoadingVisibility
{
get => loadingVisibility;
set => SetProperty(ref loadingVisibility, value);
}
private Visibility noDataVisibility;
public Visibility NoDataVisibility
{
get => noDataVisibility;
set => SetProperty(ref noDataVisibility, value);
}
private GifImage contentLoading;
public GifImage ContentLoading
{
get => contentLoading;
set => SetProperty(ref contentLoading, value);
}
private Visibility contentLoadingVisibility;
public Visibility ContentLoadingVisibility
{
get => contentLoadingVisibility;
set => SetProperty(ref contentLoadingVisibility, value);
}
private Visibility contentNoDataVisibility;
public Visibility ContentNoDataVisibility
{
get => contentNoDataVisibility;
set => SetProperty(ref contentNoDataVisibility, value);
}
private ObservableCollection<TabHeader> tabHeaders;
public ObservableCollection<TabHeader> TabHeaders
{
@ -34,13 +107,46 @@ namespace DownKyi.ViewModels.Friends
set => SetProperty(ref selectTabId, value);
}
private bool isEnabled = true;
public bool IsEnabled
{
get => isEnabled;
set => SetProperty(ref isEnabled, value);
}
private CustomPagerViewModel pager;
public CustomPagerViewModel Pager
{
get => pager;
set => SetProperty(ref pager, value);
}
private ObservableCollection<FriendInfo> contents;
public ObservableCollection<FriendInfo> Contents
{
get => contents;
set => SetProperty(ref contents, value);
}
#endregion
public ViewFollowingViewModel(IEventAggregator eventAggregator) : base(eventAggregator)
{
#region 属性初始化
// 初始化loading gif
Loading = new GifImage(Properties.Resources.loading);
Loading.StartAnimate();
LoadingVisibility = Visibility.Collapsed;
NoDataVisibility = Visibility.Collapsed;
ContentLoading = new GifImage(Properties.Resources.loading);
ContentLoading.StartAnimate();
ContentLoadingVisibility = Visibility.Collapsed;
ContentNoDataVisibility = Visibility.Collapsed;
TabHeaders = new ObservableCollection<TabHeader>();
Contents = new ObservableCollection<FriendInfo>();
#endregion
}
@ -49,7 +155,7 @@ namespace DownKyi.ViewModels.Friends
// 左侧tab点击事件
private DelegateCommand<object> leftTabHeadersCommand;
public DelegateCommand<object> LeftTabHeadersCommand => leftTabHeadersCommand ?? (leftTabHeadersCommand = new DelegateCommand<object>(ExecuteLeftTabHeadersCommand));
public DelegateCommand<object> LeftTabHeadersCommand => leftTabHeadersCommand ?? (leftTabHeadersCommand = new DelegateCommand<object>(ExecuteLeftTabHeadersCommand, CanExecuteLeftTabHeadersCommand));
/// <summary>
/// 左侧tab点击事件
@ -59,24 +165,42 @@ namespace DownKyi.ViewModels.Friends
{
if (!(parameter is TabHeader tabHeader)) { return; }
//NavigationParameters param = new NavigationParameters();
// 页面选择
Pager = new CustomPagerViewModel(1, (int)Math.Ceiling(double.Parse(tabHeader.SubTitle) / NumberInPage));
Pager.CurrentChanged += OnCurrentChanged_Pager;
Pager.CountChanged += OnCountChanged_Pager;
Pager.Current = 1;
}
//switch (tabHeader.Id)
//{
// case 0:
// regionManager.RequestNavigate("ToolboxContentRegion", ViewBiliHelperViewModel.Tag, param);
// break;
// case 1:
// regionManager.RequestNavigate("ToolboxContentRegion", ViewDelogoViewModel.Tag, param);
// break;
// case 2:
// regionManager.RequestNavigate("ToolboxContentRegion", ViewExtractMediaViewModel.Tag, param);
// break;
//}
/// <summary>
/// 左侧tab点击事件是否允许执行
/// </summary>
/// <param name="parameter"></param>
/// <returns></returns>
private bool CanExecuteLeftTabHeadersCommand(object parameter)
{
return IsEnabled;
}
#endregion
/// <summary>
/// 初始化页面数据
/// </summary>
private void InitView()
{
ContentVisibility = Visibility.Collapsed;
InnerContentVisibility = Visibility.Collapsed;
LoadingVisibility = Visibility.Visible;
NoDataVisibility = Visibility.Collapsed;
ContentLoadingVisibility = Visibility.Collapsed;
ContentNoDataVisibility = Visibility.Collapsed;
TabHeaders.Clear();
Contents.Clear();
SelectTabId = -1;
}
/// <summary>
/// 初始化左侧列表
/// </summary>
@ -84,31 +208,174 @@ namespace DownKyi.ViewModels.Friends
{
TabHeaders.Clear();
// 用户的关系状态数
UserRelationStat relationStat = null;
UserInfoSettings userInfo = SettingsManager.GetInstance().GetUserInfo();
if (userInfo != null && userInfo.Mid == mid)
{
// 用户的关系状态数
UserRelationStat relationStat = null;
await Task.Run(() =>
{
relationStat = UserStatus.GetUserRelationStat(mid);
});
if (relationStat != null)
{
TabHeaders.Add(new TabHeader { Id = -1, Title = DictionaryResource.GetString("AllFollowing"), SubTitle = relationStat.Following.ToString() });
TabHeaders.Add(new TabHeader { Id = -2, Title = DictionaryResource.GetString("WhisperFollowing"), SubTitle = relationStat.Whisper.ToString() });
}
// 用户的关注分组
List<FollowingGroup> followingGroup = null;
await Task.Run(() =>
{
followingGroup = UserRelation.GetFollowingGroup();
});
if (followingGroup != null)
{
foreach (FollowingGroup tag in followingGroup)
{
TabHeaders.Add(new TabHeader { Id = tag.TagId, Title = tag.Name, SubTitle = tag.Count.ToString() });
}
}
}
else
{
// 用户的关系状态数
UserRelationStat relationStat = null;
await Task.Run(() =>
{
relationStat = UserStatus.GetUserRelationStat(mid);
});
if (relationStat != null)
{
TabHeaders.Add(new TabHeader { Id = -1, Title = DictionaryResource.GetString("AllFollowing"), SubTitle = relationStat.Following.ToString() });
}
}
ContentVisibility = Visibility.Visible;
LoadingVisibility = Visibility.Collapsed;
}
private void LoadContent(List<RelationFollowInfo> contents)
{
InnerContentVisibility = Visibility.Visible;
ContentLoadingVisibility = Visibility.Collapsed;
ContentNoDataVisibility = Visibility.Collapsed;
foreach (var item in contents)
{
StorageHeader storageHeader = new StorageHeader();
BitmapImage header = storageHeader.GetHeaderThumbnail(item.Mid, item.Name, item.Face, 64, 64);
App.PropertyChangeAsync(new Action(() =>
{
Contents.Add(new FriendInfo(eventAggregator) { Mid = item.Mid, Header = header, Name = item.Name, Sign = item.Sign });
}));
}
}
private async Task<bool> LoadAllFollowings(int pn, int ps)
{
List<RelationFollowInfo> contents = null;
await Task.Run(() =>
{
relationStat = UserStatus.GetUserRelationStat(mid);
RelationFollow data = UserRelation.GetFollowings(mid, pn, ps);
if (data != null && data.List != null && data.List.Count > 0)
{
contents = data.List;
}
if (contents == null) { return; }
LoadContent(contents);
});
if (relationStat != null)
if (contents == null) { return false; }
return true;
}
private async Task<bool> LoadWhispers(int pn, int ps)
{
List<RelationFollowInfo> contents = null;
await Task.Run(() =>
{
TabHeaders.Add(new TabHeader { Id = -1, Title = DictionaryResource.GetString("AllFollowing"), SubTitle = relationStat.Following.ToString() });
TabHeaders.Add(new TabHeader { Id = -2, Title = DictionaryResource.GetString("WhisperFollowing"), SubTitle = relationStat.Whisper.ToString() });
}
contents = UserRelation.GetWhispers(pn, ps);
if (contents == null) { return; }
// 用户的关注分组
List<FollowingGroup> followingGroup = null;
LoadContent(contents);
});
if (contents == null) { return false; }
return true;
}
private async Task<bool> LoadFollowingGroupContent(int tagId, int pn, int ps)
{
List<RelationFollowInfo> contents = null;
await Task.Run(() =>
{
followingGroup = UserRelation.GetFollowingGroup();
contents = UserRelation.GetFollowingGroupContent(tagId, pn, ps);
if (contents == null) { return; }
LoadContent(contents);
});
if (followingGroup != null)
if (contents == null) { return false; }
return true;
}
private async void UpdateContent(int current)
{
// 是否正在获取数据
// 在所有的退出分支中都需要设为true
IsEnabled = false;
Contents.Clear();
InnerContentVisibility = Visibility.Collapsed;
ContentLoadingVisibility = Visibility.Visible;
ContentNoDataVisibility = Visibility.Collapsed;
TabHeader tab = TabHeaders[SelectTabId];
bool isSucceed;
switch (tab.Id)
{
foreach (FollowingGroup tag in followingGroup)
{
TabHeaders.Add(new TabHeader { Id = tag.TagId, Title = tag.Name, SubTitle = tag.Count.ToString() });
}
case -1:
isSucceed = await LoadAllFollowings(current, NumberInPage);
break;
case -2:
isSucceed = await LoadWhispers(current, NumberInPage);
break;
default:
isSucceed = await LoadFollowingGroupContent(tab.Id, current, NumberInPage);
break;
}
if (isSucceed)
{
InnerContentVisibility = Visibility.Visible;
ContentLoadingVisibility = Visibility.Collapsed;
ContentNoDataVisibility = Visibility.Collapsed;
}
else
{
InnerContentVisibility = Visibility.Collapsed;
ContentLoadingVisibility = Visibility.Collapsed;
ContentNoDataVisibility = Visibility.Visible;
}
IsEnabled = true;
}
private void OnCountChanged_Pager(int count) { }
private bool OnCurrentChanged_Pager(int old, int current)
{
if (!IsEnabled)
{
//Pager.Current = old;
return false;
}
UpdateContent(current);
return true;
}
/// <summary>
@ -133,11 +400,14 @@ namespace DownKyi.ViewModels.Friends
bool isFirst = navigationContext.Parameters.GetValue<bool>("isFirst");
if (isFirst)
{
InitView();
// 初始化左侧列表
InitLeftTable();
// 进入页面时显示的设置项
SelectTabId = 0;
}
}

@ -0,0 +1,65 @@
using DownKyi.Core.BiliApi.BiliUtils;
using DownKyi.Utils;
using Prism.Commands;
using Prism.Events;
using Prism.Mvvm;
using System.Windows.Media.Imaging;
namespace DownKyi.ViewModels.PageViewModels
{
public class FriendInfo : BindableBase
{
protected readonly IEventAggregator eventAggregator;
public FriendInfo(IEventAggregator eventAggregator)
{
this.eventAggregator = eventAggregator;
}
public long Mid { get; set; }
#region 页面属性申明
private BitmapImage header;
public BitmapImage Header
{
get => header;
set => SetProperty(ref header, value);
}
private string name;
public string Name
{
get => name;
set => SetProperty(ref name, value);
}
private string sign;
public string Sign
{
get => sign;
set => SetProperty(ref sign, value);
}
#endregion
#region 命令申明
// 视频标题点击事件
private DelegateCommand<object> userCommand;
public DelegateCommand<object> UserCommand => userCommand ?? (userCommand = new DelegateCommand<object>(ExecuteUserCommand));
/// <summary>
/// 视频标题点击事件
/// </summary>
/// <param name="parameter"></param>
private void ExecuteUserCommand(object parameter)
{
if (!(parameter is string tag)) { return; }
NavigateToView.NavigationView(eventAggregator, ViewUserSpaceViewModel.Tag, tag, Mid);
}
#endregion
}
}

@ -98,7 +98,9 @@ namespace DownKyi.ViewModels
{
if (!(parameter is TabHeader tabHeader)) { return; }
NavigationView(tabHeader.Id, false);
// TODO
// 此处应该根据具体状态传入true or false
NavigationView(tabHeader.Id, true);
}
#endregion

@ -257,15 +257,25 @@ namespace DownKyi.ViewModels
{ "friendId", 0 }
};
string parentViewName;
if (ParentView == ViewFriendsViewModel.Tag)
{
parentViewName = ViewIndexViewModel.Tag;
}
else
{
parentViewName = Tag;
}
switch (banner.Id)
{
case 0:
data["friendId"] = 0;
NavigateToView.NavigationView(eventAggregator, ViewFriendsViewModel.Tag, Tag, data);
NavigateToView.NavigationView(eventAggregator, ViewFriendsViewModel.Tag, parentViewName, data);
break;
case 1:
data["friendId"] = 1;
NavigateToView.NavigationView(eventAggregator, ViewFriendsViewModel.Tag, Tag, data);
NavigateToView.NavigationView(eventAggregator, ViewFriendsViewModel.Tag, parentViewName, data);
break;
}

@ -9,50 +9,219 @@
prism:ViewModelLocator.AutoWireViewModel="True">
<UserControl.Resources>
<converter:CountConverter x:Key="CountConverter" Count="1" />
<Style x:Key="ContentListStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Grid
Name="nameUserPanel"
Width="400"
Height="80"
Margin="15,15,10,5"
Cursor="Hand">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<i:InvokeCommandAction Command="{Binding UserCommand}" CommandParameter="{Binding DataContext.PageName, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<Image
Grid.Column="0"
Width="64"
Height="64"
Source="{Binding Header}">
<Image.Clip>
<EllipseGeometry
Center="32,32"
RadiusX="32"
RadiusY="32" />
</Image.Clip>
</Image>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Foreground="{DynamicResource BrushTextDark}"
Text="{Binding Name}"
TextTrimming="CharacterEllipsis"
TextWrapping="WrapWithOverflow" />
<TextBlock
Grid.Row="1"
HorizontalAlignment="Left"
VerticalAlignment="Top"
FontSize="12"
Foreground="{DynamicResource BrushTextGrey2}"
Text="{Binding Sign}"
TextTrimming="CharacterEllipsis"
TextWrapping="WrapWithOverflow"
ToolTip="{Binding Sign}" />
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition>
<ColumnDefinition.Style>
<Style TargetType="ColumnDefinition">
<Style.Triggers>
<DataTrigger Binding="{Binding TabHeaders}" Value="{x:Null}">
<Setter Property="Width" Value="0" />
</DataTrigger>
<DataTrigger Binding="{Binding TabHeaders.Count}" Value="0">
<Setter Property="Width" Value="0" />
</DataTrigger>
<DataTrigger Binding="{Binding TabHeaders.Count}" Value="1">
<Setter Property="Width" Value="0" />
</DataTrigger>
<DataTrigger Binding="{Binding TabHeaders.Count, Converter={StaticResource CountConverter}}" Value="true">
<Setter Property="Width" Value="200" />
</DataTrigger>
</Style.Triggers>
</Style>
</ColumnDefinition.Style>
</ColumnDefinition>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- 左侧tab header -->
<ListBox
Name="nameLeftTabHeaders"
Grid.Column="0"
BorderThickness="0"
ItemContainerStyle="{StaticResource LeftTabHeaderItemStyle}"
ItemsSource="{Binding TabHeaders}"
SelectedIndex="{Binding SelectTabId}"
Style="{StaticResource LeftTabHeaderStyle}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding LeftTabHeadersCommand}" CommandParameter="{Binding ElementName=nameLeftTabHeaders, Path=SelectedItem}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</ListBox>
<!-- 右侧内容区 -->
<ListBox Grid.Column="1" />
<Grid Visibility="{Binding ContentVisibility}">
<Grid.ColumnDefinitions>
<ColumnDefinition>
<ColumnDefinition.Style>
<Style TargetType="ColumnDefinition">
<Style.Triggers>
<DataTrigger Binding="{Binding TabHeaders}" Value="{x:Null}">
<Setter Property="Width" Value="0" />
</DataTrigger>
<DataTrigger Binding="{Binding TabHeaders.Count}" Value="0">
<Setter Property="Width" Value="0" />
</DataTrigger>
<DataTrigger Binding="{Binding TabHeaders.Count}" Value="1">
<Setter Property="Width" Value="0" />
</DataTrigger>
<DataTrigger Binding="{Binding TabHeaders.Count, Converter={StaticResource CountConverter}}" Value="true">
<Setter Property="Width" Value="200" />
</DataTrigger>
</Style.Triggers>
</Style>
</ColumnDefinition.Style>
</ColumnDefinition>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- 左侧tab header -->
<ListBox
Name="nameLeftTabHeaders"
Grid.Column="0"
BorderThickness="0"
IsEnabled="{Binding IsEnabled}"
ItemContainerStyle="{StaticResource LeftTabHeaderItemStyle}"
ItemsSource="{Binding TabHeaders}"
SelectedIndex="{Binding SelectTabId}"
Style="{StaticResource LeftTabHeaderStyle}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding LeftTabHeadersCommand}" CommandParameter="{Binding ElementName=nameLeftTabHeaders, Path=SelectedItem}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</ListBox>
<!-- 右侧内容区 -->
<Grid Grid.Column="1" Visibility="{Binding InnerContentVisibility}">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<ListBox
x:Name="nameContents"
Grid.Row="0"
BorderThickness="0"
ItemContainerStyle="{StaticResource ContentListStyle}"
ItemsSource="{Binding Contents}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding ContentsCommand}" CommandParameter="{Binding ElementName=nameContents, Path=SelectedItems}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.Style>
<Style TargetType="ListBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBox">
<Border
x:Name="Bd"
Padding="0"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ScrollViewer Focusable="False">
<ItemsPresenter />
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.Style>
</ListBox>
<custom:CustomPager
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
DataContext="{Binding Pager}" />
</Grid>
<!-- 加载gif -->
<StackPanel
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Vertical"
Visibility="{Binding ContentLoadingVisibility}">
<ContentControl
Width="40"
Height="40"
Content="{Binding ContentLoading}" />
<TextBlock
Margin="0,10,0,0"
FontSize="14"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource FollowingWait}" />
</StackPanel>
<!-- 没有数据提示 -->
<Image
Grid.Column="1"
Width="256"
Height="256"
Source="/DownKyi;component/Resources/no-data.png"
Visibility="{Binding ContentNoDataVisibility}" />
</Grid>
<!-- 加载gif -->
<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Vertical"
Visibility="{Binding LoadingVisibility}">
<ContentControl
Width="40"
Height="40"
Content="{Binding Loading}" />
<TextBlock
Margin="0,10,0,0"
FontSize="14"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource FollowingWait}" />
</StackPanel>
<!-- 没有数据提示 -->
<Image
Width="256"
Height="256"
Source="/DownKyi;component/Resources/no-data.png"
Visibility="{Binding NoDataVisibility}" />
</Grid>
</UserControl>

Loading…
Cancel
Save