1

I need to have something like that with XF Tabbed Page:

enter image description here

I.e., I need some panel which would appear over the whole content (including any tabs) where I can add some custom content. (The reason why I am asking it here, as it wouldn't be an issue in case of common simple page, when I would just have some overlapping view placed on the page).

In functionality it should be something like Action Sheets, but be cross-platform (i.e., defined as common XF view) and include custom content.

But it must be not necessary custom renderers with actually Action Sheet implementation (and AlertDialog accordingly to this). It would be perfect to have some view placed somewhere (I don't know where) in the page layout structure to achieve this.

Or Action Sheet and AlertDialog (with custom renderers) are still the easiest way to have it these days in XF? Thanks!

Agat
  • 4,577
  • 2
  • 34
  • 62

1 Answers1

0

You can use ACR User Dialogs, and you can specify the UseBottomSheet option to make the action sheet appear at the bottom. Its available as a NuGet package, so there is no need for any custom renderers.

Acr.UserDialogs.ActionSheetConfig  = new Acr.UserDialogs.ActionSheetConfig();
config.UseBottomSheet = true;
config.Title = "My Options";
config.Add(
    "Option 1",
    () => 
    {
        Device.BeginInvokeOnMainThread(async () => {
            await DisplayAlert("", "Clicked option 1", "OK");
        });
    },
    null);
config.Cancel = new Acr.UserDialogs.ActionSheetOption("Cancel");

And to display it:

Acr.UserDialogs.UserDialogs.Instance.ActionSheet(config);
sme
  • 4,023
  • 3
  • 28
  • 42
  • Thanks for the answer. But how I can use some custom view/layout passed to that component? – Agat Mar 02 '18 at 10:22
  • Hmm, I don't think it offers support for a custom view, other than custom icons that appear to the left of the text. – sme Mar 02 '18 at 10:29
  • Well, this is just what my question is about: to have `Custom View` in that panel. It's mentioned in the question title. :) – Agat Mar 02 '18 at 11:11