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

修改了搜索页的显示方式 #86

Merged
7 commits merged into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions PixivFSUWP/SearchPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<AcrylicBrush x:Name="detailBackground" BackgroundSource="Backdrop" TintOpacity="0.2" TintColor="{ThemeResource SystemAltHighColor}" FallbackColor="{ThemeResource SystemAltHighColor}"/>
</Grid.Background>
<StackPanel Margin="0 75 0 0" Orientation="Vertical" Width="500" x:Name="stkMain"
HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Left" FontSize="14" FontWeight="Bold" x:Uid="Keyword"/>
<AutoSuggestBox Margin="0 5 0 0" x:Name="txtWord" x:Uid="Search" QuerySubmitted="TxtWord_QuerySubmitted"
HorizontalAlignment="Stretch" QueryIcon="Find"/>
Expand Down Expand Up @@ -127,6 +127,7 @@
<TextBlock FontSize="14" FontWeight="Bold" x:Uid="TrendingTags"/>
<TextBlock Margin="5 0 0 0" FontSize="12" Foreground="{ThemeResource SystemBaseMediumColor}" VerticalAlignment="Bottom" x:Uid="TagWarning"/>
</StackPanel>
<ProgressBar IsIndeterminate="True" x:Name="progressRing"/>
<ItemsControl x:Name="panelTags" Margin="0 5 0 0">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="viewmodels:TagViewModel">
Expand Down Expand Up @@ -155,8 +156,8 @@
</ItemsControl>
</StackPanel>
</Grid>
<ProgressRing x:Name="progressRing" Margin="0 75 0 0" VerticalAlignment="Center"
HorizontalAlignment="Center" Width="75" Height="75" IsActive="True"/>
<!--<ProgressRing x:Name="progressRing" Margin="0 75 0 0" VerticalAlignment="Center"
HorizontalAlignment="Center" Width="75" Height="75" IsActive="True"/>-->
<ProgressRing x:Name="searchProgressRing" Margin="0 75 0 0" VerticalAlignment="Center"
HorizontalAlignment="Center" Width="75" Height="75" IsActive="False"
Visibility="Collapsed"/>
Expand Down
6 changes: 3 additions & 3 deletions PixivFSUWP/SearchPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ protected override void OnNavigatedFrom(NavigationEventArgs e)

async Task loadContents()
{
stkMain.Visibility = Visibility.Visible;
var tags = await getTrendingTags();
progressRing.IsActive = false;
//progressRing.IsActive = false;
progressRing.Visibility = Visibility.Collapsed;
stkMain.Visibility = Visibility.Visible;
panelTags.ItemsSource = tags;
}

Expand All @@ -102,7 +102,7 @@ public async Task ShowSearch()
await Task.Delay(200);
}
else stkMain.Visibility = Visibility.Collapsed;
progressRing.IsActive = true;
//progressRing.IsActive = true;
progressRing.Visibility = Visibility.Visible;
(panelTags.ItemsSource as List<ViewModels.TagViewModel>).Clear();
panelTags.ItemsSource = null;
Expand Down