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

RefreshingEnabled = false, not working? #103

Open
buviktoppen opened this issue Jun 28, 2023 · 2 comments
Open

RefreshingEnabled = false, not working? #103

buviktoppen opened this issue Jun 28, 2023 · 2 comments

Comments

@buviktoppen
Copy link

I want to disable pull to refresh, assumed I had to set RefreshingEnabled to false, but still it shows the spinning animation when pulling down.
Is there another way to disable it?

@symbiogenesis
Copy link
Collaborator

There are open bugs with the RefreshView in MAUI that we are using.

dotnet/maui#12977

@MaH1996SdN
Copy link

As a temporary solution that worked for me you can try this:

  1. Define a Refresh command in the viewmodel and set it a function that does nothing :)
  2. Define a boolean observableproperty called isRefreshing and set its value to false inside the Refresh command.
  3. Bind that boolean observableproperty to the "IsRefreshing" property of the datagrid as below:
<dg:DataGrid ItemsSource="{Binding Users}" PullToRefreshCommand="{Binding RefreshCommand}" IsRefreshing="{Binding IsRefreshing}">
    <dg:DataGrid.Columns>
        <dg:DataGridColumn Title="Name" PropertyName="userName"/>
        <dg:DataGridColumn Title="Surname" PropertyName="userSurname"/>
    </dg:DataGrid.Columns>
</dg:DataGrid>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants