{"id":23061609,"url":"https://github.com/syncfusionexamples/xamarin.forms-listview-inside-scrollview","last_synced_at":"2025-08-15T08:32:45.603Z","repository":{"id":54416792,"uuid":"200172874","full_name":"SyncfusionExamples/xamarin.forms-listview-inside-scrollview","owner":"SyncfusionExamples","description":"Sample showcases how to load Xamarin.Forms Listview inside Scrollview.","archived":false,"fork":false,"pushed_at":"2024-02-15T13:47:14.000Z","size":514,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T12:07:22.693Z","etag":null,"topics":["listview","scrollview","sflistview","xamarin","xamarin-android","xamarin-forms","xamarin-ios","xamarin-listview","xamarin-uwp"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SyncfusionExamples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-08-02T05:45:37.000Z","updated_at":"2023-08-27T09:52:01.000Z","dependencies_parsed_at":"2024-02-15T14:55:19.770Z","dependency_job_id":null,"html_url":"https://github.com/SyncfusionExamples/xamarin.forms-listview-inside-scrollview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2Fxamarin.forms-listview-inside-scrollview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2Fxamarin.forms-listview-inside-scrollview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2Fxamarin.forms-listview-inside-scrollview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2Fxamarin.forms-listview-inside-scrollview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SyncfusionExamples","download_url":"https://codeload.github.com/SyncfusionExamples/xamarin.forms-listview-inside-scrollview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229901701,"owners_count":18141766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["listview","scrollview","sflistview","xamarin","xamarin-android","xamarin-forms","xamarin-ios","xamarin-listview","xamarin-uwp"],"created_at":"2024-12-16T03:17:56.065Z","updated_at":"2024-12-16T03:17:56.503Z","avatar_url":"https://github.com/SyncfusionExamples.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Loading Xamarin.Forms ListView inside ScrollView\n\nWhen the `SfListView` is loaded inside the `ScrollView` with the height of total items, scrolling will not occur in the SfListView only when [AllowSwiping](https://help.syncfusion.com/cr/cref_files/xamarin/Syncfusion.SfListView.XForms~Syncfusion.ListView.XForms.SfListView~AllowSwiping.html) is set to `true`. The SfListView does not pass touch to the parent ScrollView in UWP, because swiping is handled in it.\n\nWhen the SfListView is loaded inside the ScrollView the following scenarios, the height of the total items is set to `HeightRequest` of the SfListView.\n\nIf the position of the SfListView is not in view when loading inside the StackLayout with more than one children, the SfListView will not be loaded. Because, the StackLayout passes the height for the `SfListView` as 1.\n\nWhen loading the SfListView inside the `Grid` with row definition as `Auto` in UWP, Grid passes the height for the SfListView to be 1.\n\n```\n\u003clocal:ExtScrollView x:Name=\"scrollView\" \u003e\n   \u003csync:SfListView x:Name=\"listView\" ItemsSource=\"{Binding BookInfo}\"/\u003e\n\u003c/local:ExtScrollView\u003e\n```\nWhen the SfListView is loaded inside the ScrollView with sticky header and sticky group header, it changed to scrollable. The empty space remains after the SfListView items, when the device orientation is changed to horizontal. Because, the total extend is set to the `ScrollView` in horizontal orientation\n\n```\npublic class ExtScrollView: ScrollView\n{    \n     protected override void LayoutChildren(double x, double y, double width, double height)\n     {\n         this.Content.HeightRequest = height;\n         base.LayoutChildren(x, y, width, height);\n     }\n}\n```\n\nTo know more about MVVM in ListView, please refer our documentation [here](https://help.syncfusion.com/xamarin/sflistview/mvvm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fxamarin.forms-listview-inside-scrollview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyncfusionexamples%2Fxamarin.forms-listview-inside-scrollview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fxamarin.forms-listview-inside-scrollview/lists"}