Skip to content

Commit

Permalink
Fix issue where animated icon without a source set wouldn't show fall…
Browse files Browse the repository at this point in the history
…back icon. (#4556)
  • Loading branch information
StephenLPeters authored Mar 18, 2021
1 parent d82b146 commit cb19f34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev/AnimatedIcon/AnimatedIcon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ AnimatedIcon::AnimatedIcon()
void AnimatedIcon::OnApplyTemplate()
{
__super::OnApplyTemplate();
OnSourcePropertyChanged(nullptr);
auto const panel = winrt::VisualTreeHelper::GetChild(*this, 0).as<winrt::Panel>();
m_rootPanel.set(panel);
m_currentState = GetState(*this);
Expand Down
7 changes: 7 additions & 0 deletions dev/AnimatedIcon/TestUI/AnimatedIconPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,13 @@
</controls:AnimatedIcon>
</StackPanel>
</Button>
<StackPanel Background="Maroon">
<controls:AnimatedIcon Height="100" Width="100" Foreground="Pink">
<controls:AnimatedIcon.FallbackIconSource>
<controls:SymbolIconSource Symbol="AddFriend" Foreground="Purple"/>
</controls:AnimatedIcon.FallbackIconSource>
</controls:AnimatedIcon>
</StackPanel>
</StackPanel>
</StackPanel>
</ScrollViewer>
Expand Down

0 comments on commit cb19f34

Please sign in to comment.