Class OverlayPopupHost
- Namespace
- Avalonia.Controls.Primitives
- Assembly
- Avalonia.Controls.dll
public class OverlayPopupHost : ContentControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IDataTemplateHost, ISetterValue, IPopupHost, IDisposable, IFocusScope, IManagedPopupPositionerPopup, IInputRoot, IInputElement
- Inheritance
-
OverlayPopupHost
- Implements
- Inherited Members
- Extension Methods
Constructors
OverlayPopupHost(OverlayLayer)
public OverlayPopupHost(OverlayLayer overlayLayer)
Parameters
overlayLayer
OverlayLayer
Fields
TransformProperty
Defines the Transform property.
public static readonly StyledProperty<Transform?> TransformProperty
Field Value
Properties
HostedVisualTreeRoot
Gets the root of the visual tree in the case where the popup is presented using a separate visual tree.
public Visual? HostedVisualTreeRoot { get; }
Property Value
Transform
Gets or sets a transform that will be applied to the popup.
public Transform? Transform { get; set; }
Property Value
Methods
ArrangeOverride(Size)
Positions child elements as part of a layout pass.
protected override Size ArrangeOverride(Size finalSize)
Parameters
finalSize
SizeThe size available to the control.
Returns
- Size
The actual size used.
ConfigurePosition(Visual, PlacementMode, Point, PopupAnchor, PopupGravity, PopupPositionerConstraintAdjustment, Rect?)
[Unstable("This API may be removed in Avalonia 12. If you depend on this API, please open an issue with details of your use-case.")]
public void ConfigurePosition(Visual target, PlacementMode placement, Point offset, PopupAnchor anchor = PopupAnchor.None, PopupGravity gravity = PopupGravity.None, PopupPositionerConstraintAdjustment constraintAdjustment = PopupPositionerConstraintAdjustment.All, Rect? rect = null)
Parameters
target
Visualplacement
PlacementModeoffset
Pointanchor
PopupAnchorgravity
PopupGravityconstraintAdjustment
PopupPositionerConstraintAdjustmentrect
Rect?
CreatePopupHost(Visual, IAvaloniaDependencyResolver?)
[Unstable("PopupHost is considered an internal API. Use Popup or any Popup-based controls (Flyout, Tooltip) instead.")]
public static IPopupHost CreatePopupHost(Visual target, IAvaloniaDependencyResolver? dependencyResolver)
Parameters
target
VisualdependencyResolver
IAvaloniaDependencyResolver
Returns
Dispose()
public void Dispose()
Hide()
Hides the popup.
public void Hide()
SetChild(Control?)
Sets the control to display in the popup.
public void SetChild(Control? control)
Parameters
control
Control
Show()
Shows the popup.
public void Show()
TakeFocus()
Takes focus from any currently focused native control.
public void TakeFocus()