3 Answers, 1 is accepted
0
Hello,
Thank you for contacting us.
You can set the RadDataBoundListBox.ShowPullToRefreshWhenNoData property to true to enable the pull to refresh functionality when the ItemsSource of the control is empty.
I hope this helps. Please, let us know if you have further questions.
Regards,
Rosy Topchiyska
Telerik
Thank you for contacting us.
You can set the RadDataBoundListBox.ShowPullToRefreshWhenNoData property to true to enable the pull to refresh functionality when the ItemsSource of the control is empty.
I hope this helps. Please, let us know if you have further questions.
Regards,
Rosy Topchiyska
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
지혜
Top achievements
Rank 1
answered on 16 Dec 2014, 10:32 AM
I found a case that PullToRefresh Indicator is not shown even though ShowPullToRefreshWhenNoData property set to True. I'm attaching a sample project. Please fix it if it is a bug.
=======xaml=====================
<telerik:RadDataBoundListBox
x:Name="listBox"
CacheMode="BitmapCache"
IsTabStop="False"
IsPullToRefreshEnabled="True"
ShowPullToRefreshWhenNoData="True"
HorizontalContentAlignment="Stretch"
DataVirtualizationMode="OnDemandAutomatic"
Visibility="Collapsed"/>
================xaml.cs================
public MainPage()
{
InitializeComponent();
Loaded += MainPage_Loaded;
}
async void MainPage_Loaded(object sender, RoutedEventArgs e)
{
await Task.Delay(1000);
listBox.Visibility = System.Windows.Visibility.Visible;
}
=======xaml=====================
<telerik:RadDataBoundListBox
x:Name="listBox"
CacheMode="BitmapCache"
IsTabStop="False"
IsPullToRefreshEnabled="True"
ShowPullToRefreshWhenNoData="True"
HorizontalContentAlignment="Stretch"
DataVirtualizationMode="OnDemandAutomatic"
Visibility="Collapsed"/>
================xaml.cs================
public MainPage()
{
InitializeComponent();
Loaded += MainPage_Loaded;
}
async void MainPage_Loaded(object sender, RoutedEventArgs e)
{
await Task.Delay(1000);
listBox.Visibility = System.Windows.Visibility.Visible;
}
0
Hello,
Thank you for the example. Indeed there is a problem with the PullToRefreshIndicator when the listbox Visibility is initially set to Collapsed. Our developers will further investigate this issue. As a workaround you can create the listbox with Visibility set to Visible and collapse it later, when the control has been loaded.
<
telerikPrimitives:RadDataBoundListBox
ShowPullToRefreshWhenNoData
=
"True"
Loaded
=
"ListBoxLoaded"
IsPullToRefreshEnabled
=
"True"
/>
private
void
ListBoxLoaded(
object
sender, System.Windows.RoutedEventArgs e)
{
(sender
as
RadDataBoundListBox).Visibility = System.Windows.Visibility.Collapsed;
}
I hope this helps. I have updated your Telerik points as a token of gratitude for bringing this issue to our attention. Feel free to contact us should you have any other problems.
Regards, Rosy Topchiyska
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.