Table of Contents

Class PopupPageBase

Namespace
Nalu
Assembly
Nalu.Maui.Layouts.dll

A base class for pages acting as popups.

[ContentProperty("PopupContent")]
public abstract class PopupPageBase : ContentPage, INotifyPropertyChanged, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, ILayout, IPageController, IVisualElementController, IElementController, IElementConfiguration<Page>, ISafeAreaView, ITitledElement, IToolbarElement, IContentView, IPadding, ICrossPlatformLayout, IHotReloadableView, IView, IElement, ITransform, IReplaceableView
Inheritance
PopupPageBase
Implements
Inherited Members

Constructors

PopupPageBase()

Initializes a new instance of the PopupPageBase class.

protected PopupPageBase()

Fields

CloseOnScrimTappedProperty

Bindable property for CloseOnScrimTapped.

public static readonly BindableProperty CloseOnScrimTappedProperty

Field Value

BindableProperty

PopupContentProperty

Bindable property for PopupContent.

public static readonly BindableProperty PopupContentProperty

Field Value

BindableProperty

Properties

CloseOnScrimTapped

Gets or sets a value indicating whether the popup should close when the scrim is tapped. If set to true, tapping on the scrim will close the popup.

public bool CloseOnScrimTapped { get; set; }

Property Value

bool

PopupBorder

The PopupContainer that acts as a container for the popup content.

public PopupContainer PopupBorder { get; }

Property Value

PopupContainer

PopupContent

Gets or sets the content of the popup.

public View PopupContent { get; set; }

Property Value

View

Scrim

The PopupScrim that covers the entire screen when the popup is displayed.

public PopupScrim Scrim { get; }

Property Value

PopupScrim

Methods

AnimatePopup()

Animates the popup when it appears. This method can be overridden to customize the animation behavior. By default, it animates the opacity and scale of the popup from 0 to 1 over a duration of 250 milliseconds using a cubic easing function.

protected virtual void AnimatePopup()

OnAppearing()

When overridden in a derived class, allows application developers to customize behavior immediately prior to the page becoming visible.

protected override void OnAppearing()

OnBackButtonPressed()

Determines the behavior when the back button of the page is pressed.

protected override bool OnBackButtonPressed()

Returns

bool

true when the back navigation was handled by the override, otherwise false.

Remarks

Application developers can override this method to provide behavior when the back button is pressed. When overridden to handle or cancel the navigation yourself, this method should return true.

This only works on Android and UWP for the hardware back button. On iOS, this method will never be called because there is no hardware back button.

OnParentChanging(ParentChangingEventArgs)

When overridden in a derived class, should raise the ParentChanging event.

protected override void OnParentChanging(ParentChangingEventArgs args)

Parameters

args ParentChangingEventArgs

Provides data for the ParentChanging event.

Remarks

It is the implementor's responsibility to raise the ParentChanging event.

PreparePopupAnimation()

Sets up the initial state of the popup animation. This method can be overridden to customize the initial state of the popup before it appears. By default, this method sets the opacity and scale of the popup to zero,

protected virtual void PreparePopupAnimation()

SetPopupPresentationMode(PopupPresentationMode)

Enables or disables popup presentation mode.

protected void SetPopupPresentationMode(PopupPresentationMode mode)

Parameters

mode PopupPresentationMode

The presentation mode

Remarks

The popup presentation mode involves: transparent background, no navbar, not animated modal PresentationMode. This mode is enabled by default.