Hello,
I have component like this
If I start app I see this
You can see that scrollView is moved with context. Is it correct behaviour? I would expect that scrollView will be placed on the right edge of SfListview from top to bottom(red background) and only items(content) will be moved.
Hello,
But if i only need top and bottom padding(before first item, after last item) and not for every item. How can i reach this? Without the use of converters that check the index or something similar.
|
public class Behavior : Behavior<ContentPage>
{
SfListView ListView;
ExtendedScrollView ScrollView;
protected override void OnAttachedTo(ContentPage bindable)
{
ListView = bindable.FindByName<SfListView>("listView");
ScrollView = ListView.GetScrollView();
ScrollView.Padding = new Thickness(0, 20, 0, 20); //Apply top and bottom padding
base.OnAttachedTo(bindable);
}
} |
|
<syncfusion:SfListView x:Name="listView" ItemSize="60" ItemsSource="{Binding ContactsInfo}" BackgroundColor="DarkGoldenrod">
<syncfusion:SfListView.ItemTemplate >
<DataTemplate>
<Grid x:Name="ImageTitleSubtitleListViewItem" BackgroundColor="Lavender" Margin="20,0,20,0">
...
</Grid>
</DataTemplate>
</syncfusion:SfListView.ItemTemplate>
</syncfusion:SfListView> |