Any example way to show (or hide) the Flyout page(FlyoutPage.Flyout) in Android project

Peter_1985 2,711 Reputation points
2022-06-21T03:23:16.673+00:00

Hi,
I added one Flyout page to the Android project. Any example to validate the field inside the Flyout page? Any example way to show (or hide) the Flyout page? Is there any details to control the size of the detail area of the Flyout page?

Flyout class is ContentPage, like the following, with also MenuItemsListView inside.
214736-214682-image.png

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,378 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,296 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 35,746 Reputation points Microsoft Vendor
    2022-06-24T09:25:20.323+00:00

    Hello,

    You can set IsPresented="True/False" to show (or hide) the Flyout page. But I have to say, we can't change the size.

    This ContentPage is set as FlyoutPage.Flyout Property, and we can check the source code , there is a _flyoutBounds field for its layout .

      <FlyoutPage.Flyout>  
        <pages:CustomFlyoutPageFlyout x:Name="FlyoutPage" />  
      </FlyoutPage.Flyout>  
    

    If we want to change the size, we need to change the Rectangle, but this property has been set as [EditorBrowsable(EditorBrowsableState.Never)], it's hidden, we can't use it.
    For more details, refer to https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.editorbrowsableattribute?view=net-6.0

    In addition, you could make a feature request for this issue at MAUI repo, all Xamarin feature requests will be moved to MAUI.

    Best Regards,
    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.