Hello!
I have a listView with a StackLayout and a ContentView in it´s HeaderTemplate.
This ContentView has a BindableProperty for IsVisible (default false).
<ListView Header="{Binding .}">
<ListView.HeaderTemplate>
<DataTemplate>
<StackLayout Spacing="0">
<ContentView BackgroundColor="Blue" IsVisible="{Binding BlueBlock}">
<Label TextColor="White" Text="Blue Block" />
</ContentView>
</StackLayout>
</DataTemplate>
</ListView.HeaderTemplate>
</ListView>
When I call
BlueBlock= true;
in OnAppearing nothing happens.
But
- when I use true as default for IsVisible the Block will be displayed.
- when I call BlueBlock = true in a button click, the block also appears (after the second time).
I have created a SampleApp to reproduce this problem.
Why doesn´t it work in OnAppearing?
Is this a bug, or am I doing something wrong?
The problem appears in Android.
Xamarin.Forms: 2.3.4.224
VisualStudio 2017 Enterprise (15.1)
Xamarin: 4.4.0.34
Xamarin.Android.SDK: 7.2.0.7
Thanks in advance,
Stefan