搜索增加动画过渡

This commit is contained in:
liufei
2022-05-10 16:23:00 +08:00
parent 718a7f48d2
commit 00657550b2
2 changed files with 39 additions and 36 deletions

View File

@@ -175,7 +175,8 @@
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.IsContainerVirtualizable="True"
>
<hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom1Transition}">
<UniformGrid x:Name="VerticalUFG">
<hc:TransitioningContentControl TransitionMode="Fade">
<ListBox ItemsSource="{Binding Source={StaticResource SearchIconList},Path=IconList}"
BorderThickness="0"
Padding="0,10,0,0"
@@ -239,9 +240,9 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</hc:TransitioningContentControl>
</UniformGrid>
</WrapPanel>
</Grid>

View File

@@ -74,6 +74,7 @@ namespace GeekDesk
private void SearchBox_TextChanged(object sender, TextChangedEventArgs e)
{
string inputText = SearchBox.Text.ToLower();
RightCard.VerticalUFG.Visibility = Visibility.Collapsed;
if (!string.IsNullOrEmpty(inputText))
{
SearchIconList.IconList.Clear();
@@ -95,6 +96,7 @@ namespace GeekDesk
{
SearchIconList.IconList.Clear();
}
RightCard.VerticalUFG.Visibility = Visibility.Visible;
}
public void HidedSearchBox()