This is a migrated thread and some comments may be shown as answers.

Load on Demand and Load Indicator on Code-Behind

1 Answer 108 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Breno
Top achievements
Rank 1
Breno asked on 10 Apr 2017, 12:11 PM

Hi everyone!

 

Please, can you show me an example of the working of Load on Demand and Loading Indicator, but only in code-behind?

 

I'm can't do these working on my project.

 

Much thanks if anyone help me!

1 Answer, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 12 Apr 2017, 06:44 PM
Hello Breno,

The properties are the same whether you use it in XAML or in C# (see here for the feature details).


Here's what it looks like in C#:

//Your RadListView reference (maybe a class field)
private RadListView myRadListView;
 
// pull to refresh setup (can be in the page constructor)
myRadListView.IsPullToRefreshEnabled = True;
myRadListView.RefreshRequested += RefreshRequested;
 
// the event handler
private async void RefreshRequested(object sender, PullToRefreshRequestedEventArgs e)
{
    // Do Work
 
    // hide indicator
    myRadListView.EndRefresh();
}


Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ListView
Asked by
Breno
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Share this question
or