Stop ProgressBar animation when Flow is hidden

Co-Authored-By: imsh <9258159+imsh@users.noreply.github.com>
This commit is contained in:
弘韬 张 2021-01-16 02:34:26 +08:00
parent 02211f2853
commit 5688f377e0
2 changed files with 8 additions and 1 deletions

View file

@ -97,7 +97,7 @@
Background="Transparent"/>
</Grid>
<Line x:Name="ProgressBar" HorizontalAlignment="Right"
Style="{DynamicResource PendingLineStyle}" Visibility="{Binding ProgressBarVisibility, Mode=TwoWay}"
Style="{DynamicResource PendingLineStyle}" Visibility="{Binding ProgressBarVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Y1="0" Y2="0" X2="100" Height="2" Width="752" StrokeThickness="1">
</Line>
<ContentControl>

View file

@ -84,8 +84,15 @@ namespace Flow.Launcher
QueryTextBox.SelectAll();
_viewModel.LastQuerySelected = true;
}
ProgressBar.BeginStoryboard(_progressBarStoryboard);
}
else
{
_progressBarStoryboard.Stop();
}
}
};
_settings.PropertyChanged += (o, e) =>
{