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
HorizontalOffsetProperty
Defines the HorizontalOffset property.
public static readonly StyledProperty<double> HorizontalOffsetProperty
Field Value
OverlayDismissEventPassThroughProperty
Defines the OverlayDismissEventPassThrough property
public static readonly StyledProperty<bool> OverlayDismissEventPassThroughProperty
Field Value
OverlayInputPassThroughElementProperty
Defines the OverlayInputPassThroughElement property
public static readonly StyledProperty<IInputElement?> OverlayInputPassThroughElementProperty
Field Value
PlacementAnchorProperty
Defines the PlacementAnchor property.
public static readonly StyledProperty<PopupAnchor> PlacementAnchorProperty
Field Value
PlacementConstraintAdjustmentProperty
Defines the PlacementConstraintAdjustment property
public static readonly StyledProperty<PopupPositionerConstraintAdjustment> PlacementConstraintAdjustmentProperty
Field Value
PlacementGravityProperty
Defines the PlacementAnchor property.
public static readonly StyledProperty<PopupGravity> PlacementGravityProperty
Field Value
PlacementProperty
Defines the Placement property.
public static readonly StyledProperty<PlacementMode> PlacementProperty
Field Value
ShowModeProperty
Defines the ShowMode property
public static readonly StyledProperty<FlyoutShowMode> ShowModeProperty
Field Value
VerticalOffsetProperty
Defines the VerticalOffset property.
public static readonly StyledProperty<double> VerticalOffsetProperty
Field Value
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
HorizontalOffset
Gets or sets the Horizontal offset of the popup in relation to the PlacementTarget.
public double HorizontalOffset { get; set; }
Property Value
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
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
Placement
Gets or sets the desired placement of the popup in relation to the PlacementTarget.
public PlacementMode Placement { get; set; }
Property Value
PlacementAnchor
Gets or sets the anchor point on the PlacementRect when Placement is AnchorAndGravity.
public PopupAnchor PlacementAnchor { get; set; }
Property Value
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
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
Popup
protected Popup Popup { get; }
Property Value
ShowMode
Gets or sets the desired ShowMode
public FlyoutShowMode ShowMode { get; set; }
Property Value
VerticalOffset
Gets or sets the Vertical offset of the popup in relation to the PlacementTarget.
public double VerticalOffset { get; set; }
Property Value
Methods
CreatePresenter()
Used to create the content the Flyout displays
protected abstract Control CreatePresenter()
Returns
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
ControlThe 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
ShowAtCore(Control, bool)
protected virtual bool ShowAtCore(Control placementTarget, bool showAtPointer = false)
Parameters
Returns
- bool
True, if action was handled
Events
Closing
public event EventHandler<CancelEventArgs>? Closing
Event Type
Opening
public event EventHandler? Opening