这是页脚的XAML代码:
<ListView.FooterTemplate IsVisible="{Binding IsLoading}">
<DataTemplate>
<StackLayout Padding="8">
<Label Text ="Loading ..."
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"/>
<ActivityIndicator IsRunning="{Binding IsLoading}"
Color="Blue"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"/>
</StackLayout>
</DataTemplate>
</ListView.FooterTemplate>
< p > 这个ActivityIndicator
正常工作(当IsLoading
设置为false
时,它会停止)。但是我想让整个页脚在IsLoading
设置为false
时消失,但我做不到这一点。 < /p >
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
时(仅当IsLoading
设置为null
时),会抛出System.NullReferenceException: Object reference not set to an instance of an object.
。 - Xavier Peña