We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SfPullToRefresh not working in Content View

Hello,
I need using SfPullToRefresh in Content View with C# not XAML. But I try many time it always not show PullnableContent. Please help me.
Thanks you
 sfPullToRefresh = new SfPullToRefresh {
                TransitionMode = TransitionType.SlideOnTop,
                RefreshContentThreshold = 50d,
                PullingThreshold = 200d,
                ProgressBackgroundColor = Color.White,
                VerticalOptions = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
            };
            sfPullToRefresh.Refreshed += Notify_Refreshed;
            sfPullToRefresh.Refreshing += Notify_Refreshing;
            sfPullToRefresh.Pulling += Notify_Pulling;
            DicEditedIsNull = new Dictionary<int, bool>();
            layout = new StackLayout
            {
                Padding = new Thickness(0, 5),
                WidthRequest = App.ScreenWidth,
                BackgroundColor = Color.Yellow,
                HeightRequest = App.ScreenHeight
            };
            CreateLayout(layout);
            sfPullToRefresh.PullableContent = layout;
            sfPullToRefresh.PullableContent.BackgroundColor = Color.Gray;
            sfPullToRefresh.PullableContent.VerticalOptions = LayoutOptions.FillAndExpand;
            sfPullToRefresh.PullableContent.HorizontalOptions = LayoutOptions.FillAndExpand;
            sfPullToRefresh.PullableContent.HeightRequest = App.ScreenHeight;
            this.Content = sfPullToRefresh;

1 Reply

BS Balasubramani Sundaram Syncfusion Team November 11, 2019 02:36 PM UTC

Hi Lu,  
 
Thank you for contacting Syncfusion support,  
 
Based on your provide code snippet and details we have checked the issue “PullableContent didn’t get loaded inside content view” and we unable to reproduce the issue in our end. We have set the SfPullToRefresh as content of ContentView and load inside the ContentPage in this case we didn’t use the Xaml page then also its working fine as we expected. 
 
We suspect that you have missed initializing the renderer in each platform or you have loaded any customized layout inside the PullableContent if you are loading any customized view means please share the details of that view it will help us to analyze and provide the solution earlier. 
 
Please refer the below sample and UG,  
 
 
 
UWP 
 
 
Android 
 
 
 
 
Note: Issue has been checked with Xamarin. Forms version 4.2 and Syncfusion NuGet version 17.3.0.26   
 
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us with the more details, so that it will be helpful for us to check on it and provide you the solution at the earliest.    
 
Regards,
Balasubramani Sundaram.
 


Loader.
Live Chat Icon For mobile
Up arrow icon