# Popup

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/primitives/struct-popup/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
struct Popup
```

Displays a popup window.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L48)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`window_manager_add_shadow_hint_property`](#function-window_manager_add_shadow_hint_property)
- [`child_property`](#function-child_property)
- [`inherits_transform_property`](#function-inherits_transform_property)
- [`is_open_property`](#function-is_open_property)
- [`placement_anchor_property`](#function-placement_anchor_property)
- [`placement_constraint_adjustment_property`](#function-placement_constraint_adjustment_property)
- [`placement_gravity_property`](#function-placement_gravity_property)
- [`placement_property`](#function-placement_property)
- [`placement_rect_property`](#function-placement_rect_property)
- [`placement_target_property`](#function-placement_target_property)
- [`custom_popup_placement_callback_property`](#function-custom_popup_placement_callback_property)
- [`overlay_dismiss_event_pass_through_property`](#function-overlay_dismiss_event_pass_through_property)
- [`overlay_input_pass_through_element_property`](#function-overlay_input_pass_through_element_property)
- [`horizontal_offset_property`](#function-horizontal_offset_property)
- [`is_light_dismiss_enabled_property`](#function-is_light_dismiss_enabled_property)
- [`vertical_offset_property`](#function-vertical_offset_property)
- [`topmost_property`](#function-topmost_property)
- [`takes_focus_from_native_control_property`](#function-takes_focus_from_native_control_property)
- [`should_use_overlay_layer_property`](#function-should_use_overlay_layer_property)
- [`is_using_overlay_layer_property`](#function-is_using_overlay_layer_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`closed`](#function-closed)
- [`opened`](#function-opened)
- [`closing`](#function-closing)
- [`popup_host_changed`](#function-popup_host_changed)
- [`host`](#function-host)
- [`opened_popups`](#function-opened_popups)
- [`window_manager_add_shadow_hint`](#function-window_manager_add_shadow_hint)
- [`set_window_manager_add_shadow_hint`](#function-set_window_manager_add_shadow_hint)
- [`child`](#function-child)
- [`set_child`](#function-set_child)
- [`dependency_resolver`](#function-dependency_resolver)
- [`set_dependency_resolver`](#function-set_dependency_resolver)
- [`inherits_transform`](#function-inherits_transform)
- [`set_inherits_transform`](#function-set_inherits_transform)
- [`is_light_dismiss_enabled`](#function-is_light_dismiss_enabled)
- [`set_is_light_dismiss_enabled`](#function-set_is_light_dismiss_enabled)
- [`is_open`](#function-is_open)
- [`set_is_open`](#function-set_is_open)
- [`placement_anchor`](#function-placement_anchor)
- [`set_placement_anchor`](#function-set_placement_anchor)
- [`placement_constraint_adjustment`](#function-placement_constraint_adjustment)
- [`set_placement_constraint_adjustment`](#function-set_placement_constraint_adjustment)
- [`placement_gravity`](#function-placement_gravity)
- [`set_placement_gravity`](#function-set_placement_gravity)
- [`placement`](#function-placement)
- [`set_placement`](#function-set_placement)
- [`placement_rect`](#function-placement_rect)
- [`set_placement_rect`](#function-set_placement_rect)
- [`placement_target`](#function-placement_target)
- [`set_placement_target`](#function-set_placement_target)
- [`custom_popup_placement_callback`](#function-custom_popup_placement_callback)
- [`set_custom_popup_placement_callback`](#function-set_custom_popup_placement_callback)
- [`overlay_dismiss_event_pass_through`](#function-overlay_dismiss_event_pass_through)
- [`set_overlay_dismiss_event_pass_through`](#function-set_overlay_dismiss_event_pass_through)
- [`overlay_input_pass_through_element`](#function-overlay_input_pass_through_element)
- [`set_overlay_input_pass_through_element`](#function-set_overlay_input_pass_through_element)
- [`horizontal_offset`](#function-horizontal_offset)
- [`set_horizontal_offset`](#function-set_horizontal_offset)
- [`vertical_offset`](#function-vertical_offset)
- [`set_vertical_offset`](#function-set_vertical_offset)
- [`topmost`](#function-topmost)
- [`set_topmost`](#function-set_topmost)
- [`takes_focus_from_native_control`](#function-takes_focus_from_native_control)
- [`set_takes_focus_from_native_control`](#function-set_takes_focus_from_native_control)
- [`should_use_overlay_layer`](#function-should_use_overlay_layer)
- [`set_should_use_overlay_layer`](#function-set_should_use_overlay_layer)
- [`is_using_overlay_layer`](#function-is_using_overlay_layer)
- [`open`](#function-open)
- [`close`](#function-close)
- [`get_takes_focus_from_native_control`](#function-get_takes_focus_from_native_control)
- [`set_takes_focus_from_native_control_on`](#function-set_takes_focus_from_native_control_on)
- [`set_popup_parent`](#function-set_popup_parent)
- [`is_inside_popup`](#function-is_inside_popup)
- [`is_pointer_over_popup`](#function-is_pointer_over_popup)
- [`to_popup_host_provider`](#function-to_popup_host_provider)
- [`add_opened_popup`](#function-add_opened_popup)
- [`remove_opened_popup`](#function-remove_opened_popup)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L73)

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<Popup>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L73)

<a id="function-window_manager_add_shadow_hint_property"></a>

### window_manager_add_shadow_hint_property

```rust
fn window_manager_add_shadow_hint_property() -> &'static StyledProperty<bool>
```

Defines the `WindowManagerAddShadowHint` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-child_property"></a>

### child_property

```rust
fn child_property() -> &'static StyledProperty<Option<Ref<Control>>>
```

Defines the `Child` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-inherits_transform_property"></a>

### inherits_transform_property

```rust
fn inherits_transform_property() -> &'static StyledProperty<bool>
```

Defines the `InheritsTransform` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-is_open_property"></a>

### is_open_property

```rust
fn is_open_property() -> &'static StyledProperty<bool>
```

Defines the `IsOpen` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-placement_anchor_property"></a>

### placement_anchor_property

```rust
fn placement_anchor_property() -> &'static StyledProperty<PopupAnchor>
```

Defines the `PlacementAnchor` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-placement_constraint_adjustment_property"></a>

### placement_constraint_adjustment_property

```rust
fn placement_constraint_adjustment_property() -> &'static StyledProperty<PopupPositionerConstraintAdjustment>
```

Defines the `PlacementConstraintAdjustment` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-placement_gravity_property"></a>

### placement_gravity_property

```rust
fn placement_gravity_property() -> &'static StyledProperty<PopupGravity>
```

Defines the `PlacementGravity` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-placement_property"></a>

### placement_property

```rust
fn placement_property() -> &'static StyledProperty<PlacementMode>
```

Defines the `Placement` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-placement_rect_property"></a>

### placement_rect_property

```rust
fn placement_rect_property() -> &'static StyledProperty<Option<Rect>>
```

Defines the `PlacementRect` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-placement_target_property"></a>

### placement_target_property

```rust
fn placement_target_property() -> &'static StyledProperty<Option<ElementRef<Control>>>
```

Defines the `PlacementTarget` property.

The popup does not own its placement target (it is usually an
ancestor of the popup), so the value is an element reference.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-custom_popup_placement_callback_property"></a>

### custom_popup_placement_callback_property

```rust
fn custom_popup_placement_callback_property() -> &'static StyledProperty<Option<CustomPopupPlacementCallbackValue>>
```

Defines the `CustomPopupPlacementCallback` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-overlay_dismiss_event_pass_through_property"></a>

### overlay_dismiss_event_pass_through_property

```rust
fn overlay_dismiss_event_pass_through_property() -> &'static StyledProperty<bool>
```

Defines the `OverlayDismissEventPassThrough` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-overlay_input_pass_through_element_property"></a>

### overlay_input_pass_through_element_property

```rust
fn overlay_input_pass_through_element_property() -> &'static StyledProperty<Option<ElementRef<InputElement>>>
```

Defines the `OverlayInputPassThroughElement` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-horizontal_offset_property"></a>

### horizontal_offset_property

```rust
fn horizontal_offset_property() -> &'static StyledProperty<f64>
```

Defines the `HorizontalOffset` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-is_light_dismiss_enabled_property"></a>

### is_light_dismiss_enabled_property

```rust
fn is_light_dismiss_enabled_property() -> &'static StyledProperty<bool>
```

Defines the `IsLightDismissEnabled` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-vertical_offset_property"></a>

### vertical_offset_property

```rust
fn vertical_offset_property() -> &'static StyledProperty<f64>
```

Defines the `VerticalOffset` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-topmost_property"></a>

### topmost_property

```rust
fn topmost_property() -> &'static StyledProperty<bool>
```

Defines the `Topmost` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-takes_focus_from_native_control_property"></a>

### takes_focus_from_native_control_property

```rust
fn takes_focus_from_native_control_property() -> &'static AttachedProperty<bool>
```

Defines the `TakesFocusFromNativeControl` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-should_use_overlay_layer_property"></a>

### should_use_overlay_layer_property

```rust
fn should_use_overlay_layer_property() -> &'static StyledProperty<bool>
```

Defines the `ShouldUseOverlayLayer` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-is_using_overlay_layer_property"></a>

### is_using_overlay_layer_property

```rust
fn is_using_overlay_layer_property() -> &'static DirectProperty<Popup, bool>
```

Defines the `IsUsingOverlayLayer` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L201)

<a id="function-construct"></a>

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L380)

<a id="function-new"></a>

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L402)

<a id="function-closed"></a>

### closed

```rust
fn closed(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
```

Raised when the popup closes.

Dropping the returned guard removes the handler;
`Subscription::detach` keeps it for the life of the popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L420)

<a id="function-opened"></a>

### opened

```rust
fn opened(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
```

Raised when the popup opens.

Dropping the returned guard removes the handler;
`Subscription::detach` keeps it for the life of the popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L428)

<a id="function-closing"></a>

### closing

```rust
fn closing(self: &Self, handler: impl Fn(&CancelEventArgs) -> () + 'static) -> Subscription
```

Raised before the popup closes; the close can be cancelled (internal
upstream).

Dropping the returned guard removes the handler;
`Subscription::detach` keeps it for the life of the popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L437)

<a id="function-popup_host_changed"></a>

### popup_host_changed

```rust
fn popup_host_changed(self: &Self, handler: impl Fn(Option<&Rc<dyn IPopupHost>>) -> () + 'static) -> Subscription
```

Raised when the popup host changes (the popup host provider contract).

Dropping the returned guard removes the handler;
`Subscription::detach` keeps it for the life of the popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L445)

<a id="function-host"></a>

### host

```rust
fn host(self: &Self) -> Option<Rc<dyn IPopupHost>>
```

The host of the open popup (internal upstream).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L457)

<a id="function-opened_popups"></a>

### opened_popups

```rust
fn opened_popups(self: &Self) -> Vec<Ref<Popup>>
```

The popups that are currently open directly inside this popup, in
the order they were opened.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L463)

<a id="function-window_manager_add_shadow_hint"></a>

### window_manager_add_shadow_hint

```rust
fn window_manager_add_shadow_hint(self: &Self) -> bool
```

A hint to the window manager that a shadow should be added to the
popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L469)

<a id="function-set_window_manager_add_shadow_hint"></a>

### set_window_manager_add_shadow_hint

```rust
fn set_window_manager_add_shadow_hint(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L473)

<a id="function-child"></a>

### child

```rust
fn child(self: &Self) -> Option<Ref<Control>>
```

The control to display in the popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L478)

<a id="function-set_child"></a>

### set_child

```rust
fn set_child(self: &Self, value: impl Into<Nullable<Control>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L482)

<a id="function-dependency_resolver"></a>

### dependency_resolver

```rust
fn dependency_resolver(self: &Self) -> Option<Rc<dyn IFerroDependencyResolver>>
```

A dependency resolver for the `PopupRoot`.

This property allows a client to customize the behaviour of the
popup by injecting a specialized dependency resolver into the
`PopupRoot`'s constructor.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L491)

<a id="function-set_dependency_resolver"></a>

### set_dependency_resolver

```rust
fn set_dependency_resolver(self: &Self, value: Option<Rc<dyn IFerroDependencyResolver>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L495)

<a id="function-inherits_transform"></a>

### inherits_transform

```rust
fn inherits_transform(self: &Self) -> bool
```

Determines whether the popup inherits the render transform from its
placement target. Defaults to false.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L501)

<a id="function-set_inherits_transform"></a>

### set_inherits_transform

```rust
fn set_inherits_transform(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L505)

<a id="function-is_light_dismiss_enabled"></a>

### is_light_dismiss_enabled

```rust
fn is_light_dismiss_enabled(self: &Self) -> bool
```

Determines how the popup can be dismissed.

Light dismiss is when the user taps on any area other than the
popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L513)

<a id="function-set_is_light_dismiss_enabled"></a>

### set_is_light_dismiss_enabled

```rust
fn set_is_light_dismiss_enabled(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L517)

<a id="function-is_open"></a>

### is_open

```rust
fn is_open(self: &Self) -> bool
```

Whether the popup is currently open.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L522)

<a id="function-set_is_open"></a>

### set_is_open

```rust
fn set_is_open(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L526)

<a id="function-placement_anchor"></a>

### placement_anchor

```rust
fn placement_anchor(self: &Self) -> PopupAnchor
```

The anchor point on the placement rect when the placement is
`PlacementMode::AnchorAndGravity`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L532)

<a id="function-set_placement_anchor"></a>

### set_placement_anchor

```rust
fn set_placement_anchor(self: &Self, value: PopupAnchor)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L536)

<a id="function-placement_constraint_adjustment"></a>

### placement_constraint_adjustment

```rust
fn placement_constraint_adjustment(self: &Self) -> PopupPositionerConstraintAdjustment
```

Describes how the popup position will be adjusted if the unadjusted
position would result in the popup being partly constrained.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L542)

<a id="function-set_placement_constraint_adjustment"></a>

### set_placement_constraint_adjustment

```rust
fn set_placement_constraint_adjustment(self: &Self, value: PopupPositionerConstraintAdjustment)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L546)

<a id="function-placement_gravity"></a>

### placement_gravity

```rust
fn placement_gravity(self: &Self) -> PopupGravity
```

Defines in what direction the popup should open when the placement
is `PlacementMode::AnchorAndGravity`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L552)

<a id="function-set_placement_gravity"></a>

### set_placement_gravity

```rust
fn set_placement_gravity(self: &Self, value: PopupGravity)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L556)

<a id="function-placement"></a>

### placement

```rust
fn placement(self: &Self) -> PlacementMode
```

The desired placement of the popup in relation to the placement
target.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L562)

<a id="function-set_placement"></a>

### set_placement

```rust
fn set_placement(self: &Self, value: PlacementMode)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L566)

<a id="function-placement_rect"></a>

### placement_rect

```rust
fn placement_rect(self: &Self) -> Option<Rect>
```

The anchor rectangle within the parent that the popup will be placed
relative to when the placement is
`PlacementMode::AnchorAndGravity`.

The placement rect defines a rectangle relative to the placement
target around which the popup will be opened, with the placement
anchor determining which edge of the placement target is used.

If unset, the anchor rectangle will be the bounds of the placement
target.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L580)

<a id="function-set_placement_rect"></a>

### set_placement_rect

```rust
fn set_placement_rect(self: &Self, value: Option<Rect>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L584)

<a id="function-placement_target"></a>

### placement_target

```rust
fn placement_target(self: &Self) -> Option<Ref<Control>>
```

The control that is used to determine the popup's position.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L589)

<a id="function-set_placement_target"></a>

### set_placement_target

```rust
fn set_placement_target(self: &Self, value: impl Into<Nullable<Control>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L593)

<a id="function-custom_popup_placement_callback"></a>

### custom_popup_placement_callback

```rust
fn custom_popup_placement_callback(self: &Self) -> Option<CustomPopupPlacementCallback>
```

The callback that positions the popup when the placement is
`PlacementMode::Custom`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L599)

<a id="function-set_custom_popup_placement_callback"></a>

### set_custom_popup_placement_callback

```rust
fn set_custom_popup_placement_callback(self: &Self, value: Option<CustomPopupPlacementCallback>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L603)

<a id="function-overlay_dismiss_event_pass_through"></a>

### overlay_dismiss_event_pass_through

```rust
fn overlay_dismiss_event_pass_through(self: &Self) -> bool
```

Whether the event that closes the popup is passed through to the
parent window.

When light dismiss is enabled, clicks outside the popup cause the
popup to close. When this is false, these clicks will be handled by
the popup and not be registered by the parent window. When true, the
events will be passed through to the parent window.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L617)

<a id="function-set_overlay_dismiss_event_pass_through"></a>

### set_overlay_dismiss_event_pass_through

```rust
fn set_overlay_dismiss_event_pass_through(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L621)

<a id="function-overlay_input_pass_through_element"></a>

### overlay_input_pass_through_element

```rust
fn overlay_input_pass_through_element(self: &Self) -> Option<Ref<InputElement>>
```

An element that should receive pointer input events even when
underneath the popup's overlay.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L627)

<a id="function-set_overlay_input_pass_through_element"></a>

### set_overlay_input_pass_through_element

```rust
fn set_overlay_input_pass_through_element(self: &Self, value: impl Into<Nullable<InputElement>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L631)

<a id="function-horizontal_offset"></a>

### horizontal_offset

```rust
fn horizontal_offset(self: &Self) -> f64
```

The horizontal offset of the popup in relation to the placement
target.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L637)

<a id="function-set_horizontal_offset"></a>

### set_horizontal_offset

```rust
fn set_horizontal_offset(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L641)

<a id="function-vertical_offset"></a>

### vertical_offset

```rust
fn vertical_offset(self: &Self) -> f64
```

The vertical offset of the popup in relation to the placement
target.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L647)

<a id="function-set_vertical_offset"></a>

### set_vertical_offset

```rust
fn set_vertical_offset(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L651)

<a id="function-topmost"></a>

### topmost

```rust
fn topmost(self: &Self) -> bool
```

Whether this popup appears on top of all other windows.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L656)

<a id="function-set_topmost"></a>

### set_topmost

```rust
fn set_topmost(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L660)

<a id="function-takes_focus_from_native_control"></a>

### takes_focus_from_native_control

```rust
fn takes_focus_from_native_control(self: &Self) -> bool
```

Whether the popup, on show, transfers focus from any focused native
control to the toolkit. The default is `true`.

This property only applies to advanced native control embedding
scenarios. By default, if a popup is shown when a native control is
focused, focus is transferred back to the toolkit in order for the
popup to receive input. If this property is set to `false`, then the
shown popup will not receive input until it receives an interaction
which explicitly focuses the popup, such as a mouse click.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L673)

<a id="function-set_takes_focus_from_native_control"></a>

### set_takes_focus_from_native_control

```rust
fn set_takes_focus_from_native_control(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L677)

<a id="function-should_use_overlay_layer"></a>

### should_use_overlay_layer

```rust
fn should_use_overlay_layer(self: &Self) -> bool
```

Whether the popup should be shown in the overlay layer of the parent
window.

When this is false the implementation depends on the platform. Use
`is_using_overlay_layer` to get the
actual popup behavior. This is an equivalent of the overlay popups
platform option, but settable independently per each popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L688)

<a id="function-set_should_use_overlay_layer"></a>

### set_should_use_overlay_layer

```rust
fn set_should_use_overlay_layer(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L692)

<a id="function-is_using_overlay_layer"></a>

### is_using_overlay_layer

```rust
fn is_using_overlay_layer(self: &Self) -> bool
```

Whether the popup is shown in the overlay layer of the parent
window.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L698)

<a id="function-open"></a>

### open

```rust
fn open(self: &Self)
```

Opens the popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L707)

<a id="function-close"></a>

### close

```rust
fn close(self: &Self)
```

Closes the popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L1075)

<a id="function-get_takes_focus_from_native_control"></a>

### get_takes_focus_from_native_control

```rust
fn get_takes_focus_from_native_control(control: &Control) -> bool
```

Gets the value of the `TakesFocusFromNativeControl` attached
property on the specified control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L1081)

<a id="function-set_takes_focus_from_native_control_on"></a>

### set_takes_focus_from_native_control_on

```rust
fn set_takes_focus_from_native_control_on(control: &Control, value: bool)
```

Sets the value of the `TakesFocusFromNativeControl` attached
property on the specified control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L1087)

<a id="function-set_popup_parent"></a>

### set_popup_parent

```rust
fn set_popup_parent(self: &Self, new_parent: Option<&Ref<Control>>)
```

Helper method to set popup's styling and templated parent (internal
upstream).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L1093)

<a id="function-is_inside_popup"></a>

### is_inside_popup

```rust
fn is_inside_popup(self: &Self, visual: &Visual) -> bool
```

Whether `visual` is inside the open popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L1492)

<a id="function-is_pointer_over_popup"></a>

### is_pointer_over_popup

```rust
fn is_pointer_over_popup(self: &Self) -> bool
```

Whether the pointer is over the open popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L1501)

<a id="function-to_popup_host_provider"></a>

### to_popup_host_provider

```rust
fn to_popup_host_provider(self: &Self) -> Rc<dyn IPopupHostProvider>
```

The popup as a popup host provider (the diagnostics contract it
implements upstream).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L1585)

<a id="function-add_opened_popup"></a>

### add_opened_popup

```rust
fn add_opened_popup(self: &Self, popup: &Ref<Popup>)
```

Records a popup opened directly inside this popup (internal
upstream).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L1591)

<a id="function-remove_opened_popup"></a>

### remove_opened_popup

```rust
fn remove_opened_popup(self: &Self, popup: &Ref<Popup>)
```

Forgets a popup opened directly inside this popup (internal
upstream).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/popup.rs#L1597)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<Popup>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
