I am trying to display popup using AbsoluteLayout. On a button click, Iam setting stacklayout as visible. But its not displayed.
<AbsoluteLayout x:Name="absoluteLayout">
<StackLayout x:Name="layout1"
BackgroundColor="White"
Spacing="1"
AbsoluteLayout.LayoutBounds="0,0,1,1"
AbsoluteLayout.LayoutFlags="All">
<StackLayout>
<StackLayout x:Name="popupLayout"
BackgroundColor="Gray"
AbsoluteLayout.LayoutBounds="0,0,1,1"
AbsoluteLayout.LayoutFlags="All"
IsVisible="False"
Spacing="0">
//Content
</StackLayout>
</AbsoluteLayout>
On a button click , Setting visibility to true
public void OnButtonClick(object sender, EventArgs args){
popupLayout.IsVisible = true;
}
I tried to set visibility of popupLayout to false in OnAppearing and then enabling on button click, still having same behaviour.
Update : Added code detail. By setting background to popupLayout,I came to know that on button click layout is visible, but its content / children are not displayed. Should we have to enable child views / elements separately?