Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions dev/ProgressRing/ProgressRing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ ProgressRing::ProgressRing()
SetValue(s_TemplateSettingsProperty, winrt::make<::ProgressRingTemplateSettings>());

SizeChanged({ this, &ProgressRing::OnSizeChanged });
Loaded({ this, &ProgressRing::OnLoaded });
}

winrt::AutomationPeer ProgressRing::OnCreateAutomationPeer()
Expand Down Expand Up @@ -65,6 +66,11 @@ void ProgressRing::OnSizeChanged(const winrt::IInspectable&, const winrt::IInspe
ApplyTemplateSettings();
}

void ProgressRing::OnLoaded(const winrt::IInspectable&, const winrt::IInspectable&)
{
UpdateStates();
}

void ProgressRing::OnForegroundPropertyChanged(const winrt::DependencyObject&, const winrt::DependencyProperty&)
{
if (const auto foreground = Foreground().try_as<winrt::SolidColorBrush>())
Expand Down
1 change: 1 addition & 0 deletions dev/ProgressRing/ProgressRing.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class ProgressRing :
void SetLottieForegroundColor(const winrt::IAnimatedVisualSource);
void SetLottieBackgroundColor(const winrt::IAnimatedVisualSource);
void OnSizeChanged(const winrt::IInspectable&, const winrt::IInspectable&);
void OnLoaded(const winrt::IInspectable&, const winrt::IInspectable&);
void UpdateStates();
void ApplyTemplateSettings();
void UpdateLottieProgress();
Expand Down
2 changes: 2 additions & 0 deletions dev/TabView/TestUI/TabViewPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,15 @@
<StackPanel Padding="16" Background="{ThemeResource TabViewItemHeaderBackgroundSelected}">
<TextBlock>Shop text</TextBlock>
<Button Content="SecondTabButton" AutomationProperties.Name="SecondTabButton"/>
<controls:ProgressRing IsActive="True"/>
</StackPanel>
</controls:TabViewItem>

<controls:TabViewItem x:Name="LongHeaderTab" AutomationProperties.Name="LongHeaderTab" Header="Long Header No Icon">
<StackPanel Padding="16" Background="{ThemeResource TabViewItemHeaderBackgroundSelected}">
<TextBlock >Emoji text</TextBlock>
<Button Content="Button 3"/>
<controls:ProgressRing IsActive="True"/>
</StackPanel>
</controls:TabViewItem>

Expand Down