Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add page for ProgressExtensions #1046

Merged
merged 1 commit into from
Feb 16, 2024
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
34 changes: 34 additions & 0 deletions doc/helpers/progress-extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
uid: Toolkit.Helpers.ProgressExtensions
---

# Progress Extensions

Provides attached properties to easily change the behavior of progress controls (ie. `ProgressBar` and `ProgressRing`), when nested in a complex visual tree.

## Remarks

This attached property is useful to indicate that some operation is ongoing for an entire section of a view, without having to manually set the `IsActive` property of each nested progress control.

## Attached Properties

| Property | Type | Description |
|---------------------|-------------|-----------------------------------------------------------------------------------------------|
| `IsActive` | `bool` | Once applied to a `FrameworkElement`, this property value sets whether its visual descendant progress controls display a loading indicator. |

Setting `ProgressExtensions.IsActive` to `true` will recursively enable the loading animation on all `ProgressBar` and `ProgressRing` controls in the visual tree.

## Usage

```xml
<!-- Include the following XAML namespace to use the samples below -->
xmlns:utu="using:Uno.Toolkit.UI"
...

<Grid>
<ContentPresenter
x:Name="WeeklyPromotionsPresenter"
Content="{TemplateBinding WeeklyPromotionsContent}"
utu:ProgressExtensions.IsActive="True"
...
```
2 changes: 2 additions & 0 deletions doc/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
href: helpers/input-extensions.md
- name: ItemsRepeater Extensions
href: helpers/itemsrepeater-extensions.md
- name: Progress Extensions
href: helpers/progress-extensions.md
- name: Responsive markup extension
href: helpers/responsive-extension.md
- name: StatusBar attached properties
Expand Down
Loading