Category / Section
How to use WebView in Xamarin.Forms ListView (SfListView)
1 min read
Load the website using WebView in Xamarin.Forms SfListView.
XAML
Load the Xamarin.Forms WebView in the SfListView.ItemTemplate and bind the website URL to the WebView.Source property to show the website.
<syncfusion:SfListView x:Name="listView" AutoFitMode="Height" ItemSpacing="5" Orientation="Horizontal" ItemsSource="{Binding ControlsInfo}"> <syncfusion:SfListView.ItemTemplate > <DataTemplate> <Grid x:Name="grid" BackgroundColor="#583d72"> <Grid.RowDefinitions> <RowDefinition Height="50"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Label Text="{Binding ControlName}" TextColor="White" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" FontSize="Large"/> <WebView Source="{Binding Description}" Grid.Row="1" WidthRequest="400"/> </Grid> </DataTemplate> </syncfusion:SfListView.ItemTemplate> </syncfusion:SfListView>