Skip to content

Commit

Permalink
docs: FeedView add template samples
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpinedam committed Sep 28, 2024
1 parent e04d4a5 commit 8048937
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions doc/Learn/Mvux/FeedView.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,41 @@ The `FeedView` will display this template if the underlying asynchronous operati

Example:

```xml
<FeedView ...>
<DataTemplate>
...
</DataTemplate>

<ErrorTemplate>
<DataTemplate>
<TextBlock Text="An error has ocurred while loading the data..." />
</DataTemplate>
</ErrorTemplate>
</FeedView>
```

### UndefinedTemplate

This template is displayed when the `FeedView` loads before the underlying asynchronous operation has even been called.
As soon as the asynchronous operation is invoked and awaited, the `FeedView` will switch to its `ProgressTemplate` until the operation has resulted in data, at which point it will switch to the `ValueTemplate` or `NoneTemplate`, depending on the data result.

Typically, this template will only show for a very short period - a split second or so, depending on how long it takes for the page and its Model to load.

```xml
<FeedView ...>
<DataTemplate>
...
</DataTemplate>

<UndefinedTemplate>
<DataTemplate>
<TextBlock Text="this is the start of something beautiful!" />
</DataTemplate>
</UndefinedTemplate>
</FeedView>
```

## Other notable features

### Refresh command property
Expand Down

0 comments on commit 8048937

Please sign in to comment.