Table of Contents

Class PopupFlyoutBase

Namespace
Avalonia.Controls.Primitives
Assembly
Avalonia.Controls.dll
public abstract class PopupFlyoutBase : FlyoutBase, INotifyPropertyChanged, IPopupHostProvider
Inheritance
PopupFlyoutBase
Implements
Derived
Inherited Members

Constructors

PopupFlyoutBase()

public PopupFlyoutBase()

Fields

CustomPopupPlacementCallbackProperty

Defines the CustomPopupPlacementCallback property.

public static readonly StyledProperty<CustomPopupPlacementCallback?> CustomPopupPlacementCallbackProperty

Field Value

StyledProperty<CustomPopupPlacementCallback>

HorizontalOffsetProperty

Defines the HorizontalOffset property.

public static readonly StyledProperty<double> HorizontalOffsetProperty

Field Value

StyledProperty<double>

OverlayDismissEventPassThroughProperty

Defines the OverlayDismissEventPassThrough property

public static readonly StyledProperty<bool> OverlayDismissEventPassThroughProperty

Field Value

StyledProperty<bool>

OverlayInputPassThroughElementProperty

Defines the OverlayInputPassThroughElement property

public static readonly StyledProperty<IInputElement?> OverlayInputPassThroughElementProperty

Field Value

StyledProperty<IInputElement>

PlacementAnchorProperty

Defines the PlacementAnchor property.

public static readonly StyledProperty<PopupAnchor> PlacementAnchorProperty

Field Value

StyledProperty<PopupAnchor>

PlacementConstraintAdjustmentProperty

Defines the PlacementConstraintAdjustment property

public static readonly StyledProperty<PopupPositionerConstraintAdjustment> PlacementConstraintAdjustmentProperty

Field Value

StyledProperty<PopupPositionerConstraintAdjustment>

PlacementGravityProperty

Defines the PlacementAnchor property.

public static readonly StyledProperty<PopupGravity> PlacementGravityProperty

Field Value

StyledProperty<PopupGravity>

PlacementProperty

Defines the Placement property.

public static readonly StyledProperty<PlacementMode> PlacementProperty

Field Value

StyledProperty<PlacementMode>

ShowModeProperty

Defines the ShowMode property

public static readonly StyledProperty<FlyoutShowMode> ShowModeProperty

Field Value

StyledProperty<FlyoutShowMode>

VerticalOffsetProperty

Defines the VerticalOffset property.

public static readonly StyledProperty<double> VerticalOffsetProperty

Field Value

StyledProperty<double>

Properties

CustomPopupPlacementCallback

Gets or sets a delegate handler method that positions the Popup control, when Placement is set to Custom.

public CustomPopupPlacementCallback? CustomPopupPlacementCallback { get; set; }

Property Value

CustomPopupPlacementCallback

HorizontalOffset

Gets or sets the Horizontal offset of the popup in relation to the PlacementTarget.

public double HorizontalOffset { get; set; }

Property Value

double

OverlayDismissEventPassThrough

Gets or sets a value indicating whether the event that closes the flyout is passed through to the parent window.

public bool OverlayDismissEventPassThrough { get; set; }

Property Value

bool

Remarks

Clicks outside the popup cause the popup to close. When OverlayDismissEventPassThrough is set to false, these clicks will be handled by the popup and not be registered by the parent window. When set to true, the events will be passed through to the parent window.

OverlayInputPassThroughElement

Gets or sets an element that should receive pointer input events even when underneath the flyout's overlay.

public IInputElement? OverlayInputPassThroughElement { get; set; }

Property Value

IInputElement

Placement

Gets or sets the desired placement of the popup in relation to the PlacementTarget.

public PlacementMode Placement { get; set; }

Property Value

PlacementMode

PlacementAnchor

Gets or sets the anchor point on the PlacementRect when Placement is AnchorAndGravity.

public PopupAnchor PlacementAnchor { get; set; }

Property Value

PopupAnchor

PlacementConstraintAdjustment

Gets or sets a value describing how the popup position will be adjusted if the unadjusted position would result in the popup being partly constrained.

public PopupPositionerConstraintAdjustment PlacementConstraintAdjustment { get; set; }

Property Value

PopupPositionerConstraintAdjustment

PlacementGravity

Gets or sets a value which defines in what direction the popup should open when Placement is AnchorAndGravity.

public PopupGravity PlacementGravity { get; set; }

Property Value

PopupGravity

Popup

protected Popup Popup { get; }

Property Value

Popup

ShowMode

Gets or sets the desired ShowMode

public FlyoutShowMode ShowMode { get; set; }

Property Value

FlyoutShowMode

VerticalOffset

Gets or sets the Vertical offset of the popup in relation to the PlacementTarget.

public double VerticalOffset { get; set; }

Property Value

double

Methods

CreatePresenter()

Used to create the content the Flyout displays

protected abstract Control CreatePresenter()

Returns

Control

Hide()

Hides the Flyout

public override sealed void Hide()

HideCore(bool)

protected virtual bool HideCore(bool canCancel = true)

Parameters

canCancel bool

Returns

bool

True, if action was handled

OnClosing(CancelEventArgs)

protected virtual void OnClosing(CancelEventArgs args)

Parameters

args CancelEventArgs

OnOpening(CancelEventArgs)

protected virtual void OnOpening(CancelEventArgs args)

Parameters

args CancelEventArgs

ShowAt(Control)

Shows the Flyout at the given Control

public override sealed void ShowAt(Control placementTarget)

Parameters

placementTarget Control

The control to show the Flyout at

ShowAt(Control, bool)

Shows the Flyout for the given control at the current pointer location, as in a ContextFlyout

public void ShowAt(Control placementTarget, bool showAtPointer)

Parameters

placementTarget Control

The target control

showAtPointer bool

True to show at pointer

ShowAtCore(Control, bool)

protected virtual bool ShowAtCore(Control placementTarget, bool showAtPointer = false)

Parameters

placementTarget Control
showAtPointer bool

Returns

bool

True, if action was handled

Events

Closing

public event EventHandler<CancelEventArgs>? Closing

Event Type

EventHandler<CancelEventArgs>

Opening

public event EventHandler? Opening

Event Type

EventHandler