dotnet / dotnet/maui

[WinUI] Problems while using `RefreshView`

Open
#9,247 9 comments 0 reactions 0 assignees View on GitHub
area-controls-refreshview platform/windows s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
296

Description

### Description

I have problems to get the `RefreshView` control working on WinUI. I'm not able to click content which is nested in the `RefreshView`. Also, I cannot trigger the pull to refresh function.

![image](https://user-images.githubusercontent.com/2952443/183292010-f2981d82-0ad5-4a5c-a0e8-39847d8fd737.png)

The XAML code for the screenshot above:

```xaml





















```

```cs
public Command RefreshPageCommand { get; set; }
bool RefreshPageCommand_CanExcecute()
{
return !IsRefreshing;
}
async Task RefreshPageAction()
{
try
{
IsRefreshing = true;
List tasks = new()
{
KlipperClient.Instance.RefreshPrintStatusAsync(),
KlipperClient.Instance.RefreshVirtualSdCardStatusAsync(),
KlipperClient.Instance.RefreshPrinterInfoAsync(),
};
await Task.WhenAll(tasks);
KlipperState = KlipperClient.Instance.KlipperState;
IsPrinterOnline = KlipperState == "ready";

if (IsPrinterOnline)
{
CachedTemperatures = await KlipperClient.Instance.GetServerCachedTemperatureDataAsync();
UpdateTemperatureHistory();
}
}
catch (Exception exc)
{
// Log error
EventManager.Instance.LogError(exc);
}
IsRefreshing = false;
}
```

### Steps to Reproduce

1. Create a `RefreshView` and run the app on Windows

### Version with bug

6.0.408 (current)

### Last version that worked well

Unknown/Other

### Affected platforms

Windows

### Affected platform versions

windows10.0.19041.0

### Did you find any workaround?

_No response_

### Relevant log output

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue on Windows using the RefreshView XAML and RefreshPageCommand shown in the report. Check whether nested content can be clicked and whether pull-to-refresh invokes the command; done means both interactions work on windows10.0.19041.0 without changing the reported binding behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.