How do I prevent PullToRefreshIndicator go to invisible.

4 posts, 0 answers
  1. 지혜
    지혜 avatar
    5 posts
    Member since:
    Oct 2014

    Posted 08 Dec 2014 Link to this post

    I want to show PullToRefreshIndicator even though a listbox has no items.
    Could tell me how to do?

  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 10 Dec 2014 Link to this post

    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
     

    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.

     
  3. DevCraft banner
  4. 지혜
    지혜 avatar
    5 posts
    Member since:
    Oct 2014

    Posted 16 Dec 2014 in reply to Rosy Topchiyska Link to this post

    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;
            }




  5. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 18 Dec 2014 Link to this post

    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.

     
Back to Top
DevCraft banner