Search code examples
iosxamarineffect

Master Detail Page No Fade Effect Xamarin.iOS


When loading main menu (master detail page) on android there is a "dim" on the right side for the content page. However, on iOS it doesn't work, there is no dim on the detail page. How to implement "faded" effect on the detailed page when I open the main menu?

I have tried this solution: Xamarin Dim Page (Master Detail Page)

and this: https://github.com/xamarin/Xamarin.Forms/pull/7437

But wasn't unable to reproduce the solution...Please help :)


Solution

  • You can get the fade by MasterDetailPage Shadow on iOS:

    This platform-specific controls whether the detail page of a MasterDetailPage has shadow applied to it, when revealing the master page. It's consumed in XAML by setting the MasterDetailPage.ApplyShadow bindable property to true:

    <MasterDetailPage ...
                      xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
                      ios:MasterDetailPage.ApplyShadow="true">
        ...
    </MasterDetailPage>
    

    You can read the document for more detailed information.