Skip to content

Commit b9480cf

Browse files
Feature: Added progress indicator when loading tabs (#10916)
Fixed: Progress ring indicator is missing from tabs
1 parent c26273f commit b9480cf

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/Files.App/UserControls/MultitaskingControl/HorizontalMultitaskingControl.xaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,13 @@
240240
IsTabStop="False" />
241241
</Viewbox>
242242

243+
<ProgressRing
244+
x:Name="LoadingIndicator"
245+
MaxWidth="{ThemeResource TabViewItemHeaderIconSize}"
246+
MaxHeight="{ThemeResource TabViewItemHeaderIconSize}"
247+
Margin="{ThemeResource TabViewItemHeaderIconMargin}"
248+
Visibility="Collapsed" />
249+
243250
<!--
244251
If we template bind the ContentPresenter's Content property to the TabViewItem.Header property
245252
we unfortunately run into the following issue if the header is [null] or empty:
@@ -544,6 +551,16 @@
544551
</VisualState.Setters>
545552
</VisualState>
546553
</VisualStateGroup>
554+
555+
<VisualStateGroup x:Name="LoadingStates">
556+
<VisualState x:Name="NotLoading" />
557+
<VisualState x:Name="Loading">
558+
<VisualState.Setters>
559+
<Setter Target="LoadingIndicator.Visibility" Value="Visible" />
560+
<Setter Target="IconBox.Visibility" Value="Collapsed" />
561+
</VisualState.Setters>
562+
</VisualState>
563+
</VisualStateGroup>
547564
</VisualStateManager.VisualStateGroups>
548565
</Grid>
549566
</ControlTemplate>

0 commit comments

Comments
 (0)