Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147461 | Sep 11,2019 11:31 AM UTC | Sep 3,2020 06:29 AM UTC | Xamarin.Forms | 8 |
![]() |
Tags: SfExpander |
<sflistview:SfListView ItemsSource="{Binding Info}"
AutoFitMode="DynamicHeight"> |
public class ExtendedListView : SfListView
{
VisualContainer container;
public ExtendedListView()
{
container = this.GetVisualContainer();
container.PropertyChanged += Container_PropertyChanged;
}
private void Container_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(Height))
{
var extent = (double)container.GetType().GetRuntimeProperties().FirstOrDefault(container => container.Name == "TotalExtent").GetValue(container);
this.HeightRequest = extent;
}
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.