Flyouts: Xamarin.Forms vs UWP

Nathan Sokalski 4,111 Reputation points
2020-12-15T17:12:11.29+00:00

I am working on converting a UWP app to Xamarin.Forms for Android. In UWP, I used flyouts by adding

<FlyoutBase.AttachedFlyout><Flyout>...</Flyout></FlyoutBase.AttachedFlyout>

inside another element (such as a StackPanel), and it would show/hide a message style box when I pressed/released (I used this for the purpose of displaying small info and/or help boxes). But it seems like Xamarin.Forms uses flyouts (or more like FlyoutItem) to display menus for the entire page. I am getting the impression that flyout has a completely different meaning and/or purpose between the two. So I have two questions. First, are they different things? Second, is there any kind of built-in way to do what flyouts did in UWP (without manually writing code to detect pressed/released and setting the visibility of an element)? Thanks.

Developer technologies | .NET | Xamarin
0 comments No comments
{count} votes

Accepted answer
  1. JarvanZhang 23,971 Reputation points
    2020-12-16T09:13:58.99+00:00

    Hi, njsokalski. The FlyoutBase is different with Xamarin.Forms.Flyout. FlyoutBase is a flyout is a light dismiss container that can show arbitrary UI as its content. Xamarin.Forms.Flyout is the root menu for a Shell application. It's a navigation wayand can only be used in Shell templates.

    The Xamarin.Forms Api doesn't provide a control that works like the FlyoutBase. You could use custom views to achieve the function. Or you could report this requirement as feature request to the product team on github.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.