Interface IPopupHost
- Namespace
- Avalonia.Controls.Primitives
- Assembly
- Avalonia.Controls.dll
Represents the top-level control opened by a Popup.
[NotClientImplementable]
[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 interface IPopupHost : IDisposable, IFocusScope
- Inherited Members
Remarks
A popup host can be either be a popup window created by the operating system (PopupRoot) or an OverlayPopupHost which is created on an OverlayLayer.
Properties
Height
Gets or sets the fixed height of the popup.
double Height { get; set; }
Property Value
HostedVisualTreeRoot
Gets the root of the visual tree in the case where the popup is presented using a separate visual tree.
Visual? HostedVisualTreeRoot { get; }
Property Value
MaxHeight
Gets or sets the maximum height of the popup.
double MaxHeight { get; set; }
Property Value
MaxWidth
Gets or sets the maximum width of the popup.
double MaxWidth { get; set; }
Property Value
MinHeight
Gets or sets the minimum height of the popup.
double MinHeight { get; set; }
Property Value
MinWidth
Gets or sets the minimum width of the popup.
double MinWidth { get; set; }
Property Value
Presenter
Gets the presenter from the control's template.
ContentPresenter? Presenter { get; }
Property Value
Topmost
Gets or sets whether the popup appears on top of all other windows.
bool Topmost { get; set; }
Property Value
Transform
Gets or sets a transform that will be applied to the popup.
Transform? Transform { get; set; }
Property Value
Width
Gets or sets the fixed width of the popup.
double Width { get; set; }
Property Value
Methods
ConfigurePosition(PopupPositionRequest)
Configures the position of the popup according to a target control and a set of placement parameters.
void ConfigurePosition(PopupPositionRequest positionRequest)
Parameters
positionRequest
PopupPositionRequest
Hide()
Hides the popup.
void Hide()
SetChild(Control?)
Sets the control to display in the popup.
void SetChild(Control? control)
Parameters
control
Control
Show()
Shows the popup.
void Show()
TakeFocus()
Takes focus from any currently focused native control.
void TakeFocus()
Events
TemplateApplied
Raised when the control's template is applied.
event EventHandler<TemplateAppliedEventArgs>? TemplateApplied