for some need I have to add a grid into my content page. I tried this :
public HomePage()
{
Grid = new Grid
{
RowDefinitions = new RowDefinitionCollection() { new RowDefinition() { Height = GridLength.Star } },
ColumnDefinitions = new ColumnDefinitionCollection() { new ColumnDefinition() { Width = GridLength.Star } },
VerticalOptions = LayoutOptions.FillAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand,
ColumnSpacing = 0,
RowSpacing = 0,
};
}
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
base.OnPropertyChanged(propertyName);
if (propertyName == ContentProperty.PropertyName)
{
if (!IsGridSet)
{
Grid.Children.Add(Content);
IsGridSet = true;
Content = Grid;
}
}
}
It seems to work because the page is shown correctly, but none control works, Button, entry everything seems to be deactivate or unreachable, like if one another transparent component was placed on foreground.