优化关注模块和登陆功能

This commit is contained in:
muqing 2024-12-06 09:29:28 +08:00
parent 3da0341de8
commit e3b741f07d
2 changed files with 4 additions and 12 deletions

View File

@ -40,7 +40,6 @@
Grid.Column="0"
ItemTemplate="{StaticResource ConCernItem}"
ItemsSource="{x:Bind communitylist}"
Loaded="ListViewA_Loaded"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden"
SelectionChanged="ListViewA_SelectionChanged"

View File

@ -64,9 +64,11 @@ public sealed partial class ConcernPage : Page
communitylist.Add(item);
}
if (ListViewA.Items.Count > 0)
{
ListViewA.SelectedIndex = 0;
}
}
catch (Exception e)
{
Debug.WriteLine(e);
@ -124,13 +126,4 @@ public sealed partial class ConcernPage : Page
gj.sc(selectedItem);
dongtaixiaoxi();
}
private void ListViewA_Loaded(object sender, RoutedEventArgs e)
{
// 检查是否有项目并设置默认选中项为第一个项
if (ListViewA.Items.Count > 0)
{
ListViewA.SelectedIndex = 0;
}
}
}