Skip to content

erossini/MauiRefreshView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building a MAUI CustomRefreshView

Solving the .NET MAUI RefreshView Limitation on macOS: building a MAUI CustomRefreshView from scratch for all platforms

The Problem: RefreshView on macOS

The built-in RefreshView control in .NET MAUI enables pull-to-refresh functionality for scrollable content. However, as of .NET MAUI 9, RefreshView is not supported on macOS. Attempting to use it will result in runtime errors or simply no refresh gesture support.

Why does this happen?

  • The underlying gesture and native control implementation for RefreshView is missing on macOS.
  • The official documentation and GitHub issues confirm this limitation.

Impact

  • macOS users cannot trigger refresh actions via pull gestures.
  • UI consistency and user experience are affected.

Here some Microsoft documentation about it:

Warning

UIStepper, UIPickerView, and UIRefreshControl aren't supported in the Mac user interface idiom by Apple. This means that the .NET MAUI controls that consume these native controls (Stepper, Picker and RefreshView) can't be used in the Mac user interface idiom. Attempting to do so will throw a macOS exception.

In addition, the following constraints apply in the Mac user interface idiom:

Usage

Here an example of how to use the component

<components:CustomRefreshView
	IndicatorBackground="{StaticResource Gray100}"
	IndicatorPosition="Top"
	IndicatorText="Loading data..."
	IndicatorTextColor="{StaticResource OffBlack}"
	IsRefreshing="{Binding IsRefreshing}"
	RefreshColor="{AppThemeBinding Light={StaticResource Primary10},
									Dark={StaticResource Primary10}}"
	RefreshCommand="{Binding RefreshCommand}">
	<components:CustomRefreshView.RefreshContent>
  </components:CustomRefreshView.RefreshContent>
</components:CustomRefreshView>

About

Solving the .NET MAUI RefreshView Limitation on macOS: building a MAUI CustomRefreshView from scratch for all platforms

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages