Skip to content

Commit

Permalink
update visual states logic
Browse files Browse the repository at this point in the history
  • Loading branch information
karkarl committed Aug 21, 2023
1 parent be80d88 commit 2c2b16f
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions dev/ProgressBar/ProgressBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,7 @@ void ProgressBar::OnShowErrorPropertyChanged(const winrt::DependencyPropertyChan

void ProgressBar::UpdateStates()
{
if (Visibility() == winrt::Visibility::Collapsed) {
if (ShowError())
{
winrt::VisualStateManager::GoToState(*this, s_CollapsedErrorStateName, true);
}
else if (ShowPaused())
{
winrt::VisualStateManager::GoToState(*this, s_CollapsedPausedStateName, true);
}
else
{
winrt::VisualStateManager::GoToState(*this, s_CollapsedStateName, true);
}
}
else if (IsIndeterminate())
if (IsIndeterminate() && Visibility() == winrt::Visibility::Visible)
{
if (ShowError())
{
Expand Down

0 comments on commit 2c2b16f

Please sign in to comment.