Hello,
Welcome to Microsoft Q&A!
The code is still working but we have to complete it in shared project .
Shared project
//create a class
public class SafeAreaPaddingEffect : RoutingEffect
{
public SafeAreaPaddingEffect() : base("Enterprise.SafeAreaPaddingEffect")
{
}
}
//xaml
xmlns:effect="clr-namespace:FormsApp"
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ContentView BackgroundColor="Green">
<ContentView.Effects>
<effect:SafeAreaPaddingEffect />
</ContentView.Effects>
<Label Text="Hello, from XamarinHelp.com" />
</ContentView>
</Grid>
Test
Thank you.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.